@@ -16,6 +16,12 @@ def missing_key(*args, **kwargs):
1616 )(* args , ** kwargs )
1717
1818
19+ def missing_proxy (* args , ** kwargs ):
20+ return skipIf (
21+ "PROXY_URL" not in os .environ , "Missing PROXY_URL environment variable"
22+ )(* args , ** kwargs )
23+
24+
1925@missing_key
2026class CustomDotTestCase (TestCase ):
2127 # For unknown reasons, workers are not always
@@ -51,15 +57,15 @@ def test_process_bulk(self):
5157
5258
5359@missing_key
54- @skipIf ( "PROXY_URL" not in os . environ , "Missing PROXY_URL environment variable" )
60+ @missing_proxy
5561class FuncaptchaTestCase (TestCase ):
5662 # CI Proxy is unstable.
5763 # Occasionally fails, so I repeat my attempt to have others selected.
5864 @retry (tries = 3 )
5965 def test_funcaptcha (self ):
60- from examples import funcaptcha
66+ from examples import funcaptcha_request
6167
62- self .assertTrue ( funcaptcha .process ())
68+ self .assertIn ( 'Solved!' , funcaptcha_request .process ())
6369
6470
6571@missing_key
@@ -73,7 +79,8 @@ def test_process(self):
7379
7480
7581@missing_key
76- class RecaptchaV3TestCase (TestCase ):
82+ @skipIf (True , "Anti-captcha unable to provide required score, but we tests via proxy" )
83+ class RecaptchaV3ProxylessTestCase (TestCase ):
7784 # Anticaptcha responds is not fully reliable.
7885 @retry (tries = 3 )
7986 def test_process (self ):
@@ -114,6 +121,7 @@ def test_process(self):
114121
115122
116123@missing_key
124+ @skipIf (True , 'We testing via proxy for performance reason.' )
117125class HCaptchaTaskProxylessTestCase (TestCase ):
118126 @retry (tries = 3 )
119127 def test_process (self ):
@@ -123,12 +131,13 @@ def test_process(self):
123131
124132
125133@missing_key
126- class HCaptchaTaskProxylessTestCase (TestCase ):
134+ class HCaptchaTaskTestCase (TestCase ):
127135 def test_process (self ):
128- from examples import hcaptcha_request
136+ from examples import hcaptcha_request_proxy
129137
130138 self .assertIn (
131- "Your request have submitted successfully." , hcaptcha_request .process ()
139+ "Your request have submitted successfully." ,
140+ hcaptcha_request_proxy .process (),
132141 )
133142
134143
0 commit comments