diff --git a/tests/test_package.py b/tests/test_package.py index 972ea0c7..f06ead63 100644 --- a/tests/test_package.py +++ b/tests/test_package.py @@ -177,28 +177,28 @@ def check_result(filename, packages, regen=False): # check_result(expected_file, result) -@mock.patch("requests.get") -def test_packages_busybox(mock_get): - test_data = [ - "tests/data/dirlisting/generic/busybox/index.html", - ] +# @mock.patch("requests.get") +# def test_packages_busybox(mock_get): +# test_data = [ +# "tests/data/dirlisting/generic/busybox/index.html", +# ] - mock_get.side_effect = [ - type( - "Response", - (), - { - "content": file_content(file).encode(), - "raise_for_status": lambda: None, - }, - ) - for file in test_data - ] +# mock_get.side_effect = [ +# type( +# "Response", +# (), +# { +# "content": file_content(file).encode(), +# "raise_for_status": lambda: None, +# }, +# ) +# for file in test_data +# ] - expected_file = "tests/data/dirlisting/generic/busybox-expected.json" - result = info("pkg:generic/busybox") +# expected_file = "tests/data/dirlisting/generic/busybox-expected.json" +# result = info("pkg:generic/busybox") - check_result(expected_file, result) +# check_result(expected_file, result) # @mock.patch("requests.get") @@ -441,28 +441,28 @@ def test_packages_busybox(mock_get): # check_result(expected_file, result) -# @mock.patch("requests.get") -# def test_packages_openssh(mock_get): -# test_data = [ -# "tests/data/dirlisting/generic/openssh/index.html", -# ] +@mock.patch("requests.get") +def test_packages_openssh(mock_get): + test_data = [ + "tests/data/dirlisting/generic/openssh/index.html", + ] -# mock_get.side_effect = [ -# type( -# "Response", -# (), -# { -# "content": file_content(file).encode(), -# "raise_for_status": lambda: None, -# }, -# ) -# for file in test_data -# ] + mock_get.side_effect = [ + type( + "Response", + (), + { + "content": file_content(file).encode(), + "raise_for_status": lambda: None, + }, + ) + for file in test_data + ] -# expected_file = "tests/data/dirlisting/generic/openssh-expected.json" -# result = info("pkg:generic/openssh") + expected_file = "tests/data/dirlisting/generic/openssh-expected.json" + result = info("pkg:generic/openssh") -# check_result(expected_file, result) + check_result(expected_file, result) # @mock.patch("requests.get")