File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,20 @@ def test_tor_launch_own_process(self):
7878 authors = [a for a in scholarly .search_author (query )]
7979 self .assertGreaterEqual (len (authors ), 1 )
8080
81+ class TestFreeProxy (unittest .TestCase ):
82+ luminati = os .getenv ("USERNAME" ) and os .getenv ("PASSWORD" ) and os .getenv ("PORT" )
83+ scraperAPI = os .getenv ('SCRAPER_API_KEY' )
84+ skipIf = (luminati is not None ) or (scraperAPI is not None )
85+
86+ @unittest .skipIf (skipIf , reason = "Other proxy is being used" )
87+ def test_freeproxy (self ):
88+ """
89+ Test that we can set up FreeProxy successfully
90+ """
91+ proxy_generator = ProxyGenerator ()
92+ success = proxy_generator .FreeProxies ()
93+ self .assertTrue (success )
94+ self .assertEqual (proxy_generator .proxy_mode , "FREE_PROXIES" )
8195
8296class TestScholarly (unittest .TestCase ):
8397
You can’t perform that action at this time.
0 commit comments