-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- free (non auth) proxies' source
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |