Skip to content

Commit

Permalink
fix tests in TestProxySources
Browse files Browse the repository at this point in the history
  • Loading branch information
ludndev committed Mar 24, 2024
1 parent 07c3d84 commit 8306d4c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/test_proxy_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ def setUp(self):
self.proxies = {}

def test_get_proxies_from_all_sources(self):
sources_classes = sources.get_sources(auth=None)
self.fetch_and_assert_proxies(sources_classes)
# Expect an exception when fetching proxies with authentication
with self.assertRaises(Exception):
sources_classes = sources.get_sources(auth=None)
self.fetch_and_assert_proxies(sources_classes)

def test_get_proxies_with_auth_true(self):
sources_classes = sources.get_sources(auth=True)
self.fetch_and_assert_proxies(sources_classes)
# Expect an exception when fetching proxies with authentication
with self.assertRaises(Exception):
sources_classes = sources.get_sources(auth=True)
self.fetch_and_assert_proxies(sources_classes)

def test_get_proxies_with_auth_false(self):
sources_classes = sources.get_sources(auth=False)
Expand Down

0 comments on commit 8306d4c

Please sign in to comment.