Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_validate_valid_download_source():
validate_download_source("https://www.apache.org/dyn/closer.lua?action=download&filename=hadoop/common/hadoop-2.8.5/hadoop-2.8.5.tar.gz")
validate_download_source("https://www.apache.org/dyn/closer.lua?action=download&filename=spark/spark-2.4.4/spark-2.4.4-bin-hadoop2.7.tgz")
def test_validate_valid_download_source():
validate_download_source("https://www.apache.org/dyn/closer.lua?action=download&filename=hadoop/common/hadoop-2.8.5/hadoop-2.8.5.tar.gz")
validate_download_source("https://www.apache.org/dyn/closer.lua?action=download&filename=spark/spark-2.4.4/spark-2.4.4-bin-hadoop2.7.tgz")
def test_validate_invalid_download_source():
with pytest.raises(Error):
validate_download_source("https://www.apache.org/dyn/closer.lua?action=download&filename=hadoop/common/hadoop-2.8.3/hadoop-2.8.3.tar.gz")