diff --git a/tests/test_harvester.py b/tests/test_harvester.py index fa7c3d9..be24d05 100644 --- a/tests/test_harvester.py +++ b/tests/test_harvester.py @@ -17,8 +17,7 @@ def start_web_server(): def test_fetch_list(): expected = ['127.0.0.1:9000', '127.0.0.1:9001', 'username:pa$$@word@127.0.0.1:9002'] result = fetch_list('http://localhost:8888/proxies1.txt') - for proxy in expected: - assert proxy in result + assert set(expected).issubset(result) def test_fetch_list_fail(): @@ -30,12 +29,10 @@ def test_fetch_list_fail(): def test_fetch_list_only_valid(): expected = ['127.0.0.1:9000', '127.0.0.1:9001', 'username:pa$$@word@127.0.0.1:9002'] result = fetch_list('http://localhost:8888/proxies1.txt') - for proxy in expected: - assert proxy in result + assert set(expected).issubset(result) def test_fetch_all(): expected = ['127.0.0.1:9000', '127.0.0.1:9001', 'username:pa$$@word@127.0.0.1:9002', '127.0.0.1:9999'] result = fetch_all(['http://localhost:8888/proxies1.txt', 'http://localhost:8888/proxies2.txt']) - for proxy in expected: - assert proxy in result + assert set(expected).issubset(result)