Skip to content

Commit

Permalink
add tests for proxies' sources
Browse files Browse the repository at this point in the history
- free (non auth) proxies' source
  • Loading branch information
ludndev committed Mar 23, 2024
1 parent f9b5b8b commit c1dd670
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/test_proxy_sources.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import unittest
import sources


class TestProxySources(unittest.TestCase):
def setUp(self):
self.proxies = {}

def test_get_proxies_from_all_sources(self):
sources_classes = sources.get_sources(auth=False)
for source_class in sources_classes:
source_instance = source_class()
if source_class.__name__ not in self.proxies:
self.proxies[source_class.__name__] = source_instance.get_proxies()
for source in self.proxies.keys():
# Assert that the total number of proxies retrieved is greater than zero
self.assertGreater(len(self.proxies[source]), 0)


if __name__ == '__main__':
unittest.main()

0 comments on commit c1dd670

Please sign in to comment.