Skip to content

Commit b37d815

Browse files
committed
Fix E2E tests: update example imports to use sync_ prefix
The example files were renamed with sync_ prefix but test_examples.py still imported them by their old names. https://claude.ai/code/session_01Pimg4VAco2v4srPeZj44Zm
1 parent 2bdcac8 commit b37d815

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

tests/test_examples.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def missing_proxy(*args, **kwargs):
2222
class AntiGateTestCase(TestCase):
2323
@retry(tries=3)
2424
def test_process_antigate(self):
25-
from examples import antigate
25+
from examples import sync_antigate as antigate
2626

2727
solution = antigate.process()
2828
for key in ["url", "domain", "localStorage", "cookies", "fingerprint"]:
@@ -37,7 +37,7 @@ class FuncaptchaTestCase(TestCase):
3737
# Occasionally fails, so I repeat my attempt to have others selected.
3838
@retry(tries=3)
3939
def test_funcaptcha(self):
40-
from examples import funcaptcha_request
40+
from examples import sync_funcaptcha_request as funcaptcha_request
4141

4242
self.assertIn("Solved!", funcaptcha_request.process())
4343

@@ -48,7 +48,7 @@ class RecaptchaRequestTestCase(TestCase):
4848
# Anticaptcha responds is not fully reliable.
4949
@retry(tries=6)
5050
def test_process(self):
51-
from examples import recaptcha_request
51+
from examples import sync_recaptcha_request as recaptcha_request
5252

5353
self.assertIn(recaptcha_request.EXPECTED_RESULT, recaptcha_request.process())
5454

@@ -60,7 +60,7 @@ class RecaptchaV3ProxylessTestCase(TestCase):
6060
# Anticaptcha responds is not fully reliable.
6161
@retry(tries=3)
6262
def test_process(self):
63-
from examples import recaptcha3_request
63+
from examples import sync_recaptcha3_request as recaptcha3_request
6464

6565
self.assertTrue(recaptcha3_request.process()["success"])
6666

@@ -84,7 +84,7 @@ class RecaptchaSeleniumtTestCase(TestCase):
8484
def test_process(self):
8585
from selenium.webdriver.chrome.options import Options
8686

87-
from examples import recaptcha_selenium
87+
from examples import sync_recaptcha_selenium as recaptcha_selenium
8888

8989
options = Options()
9090
options.headless = True
@@ -100,7 +100,7 @@ def test_process(self):
100100
@missing_key
101101
class TextTestCase(TestCase):
102102
def test_process(self):
103-
from examples import text
103+
from examples import sync_text as text
104104

105105
self.assertEqual(text.process(text.IMAGE).lower(), text.EXPECTED_RESULT.lower())
106106

@@ -111,7 +111,7 @@ def test_process(self):
111111
class HCaptchaTaskProxylessTestCase(TestCase):
112112
@retry(tries=3)
113113
def test_process(self):
114-
from examples import hcaptcha_request
114+
from examples import sync_hcaptcha_request as hcaptcha_request
115115

116116
self.assertIn(hcaptcha_request.EXPECTED_RESULT, hcaptcha_request.process())
117117

@@ -122,7 +122,7 @@ def test_process(self):
122122
class HCaptchaTaskTestCase(TestCase):
123123
@retry(tries=3)
124124
def test_process(self):
125-
from examples import hcaptcha_request_proxy
125+
from examples import sync_hcaptcha_request_proxy as hcaptcha_request_proxy
126126

127127
self.assertIn(
128128
"Your request have submitted successfully.",

0 commit comments

Comments
 (0)