Skip to content

Commit 681c3fe

Browse files
author
Andrei
committed
Update test_mt_captcha.py
1 parent 8deb8aa commit 681c3fe

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

tests/test_mt_captcha.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,27 @@ def test_params_context(self, proxy_type: str, captcha_type: str):
5555
Failed tests
5656
"""
5757

58-
@pytest.mark.parametrize("captcha_type", captcha_types)
59-
def test_proxy_err(self, captcha_type: str):
58+
def test_proxy_err(self):
6059
resp = MtCaptcha(
61-
api_key=self.API_KEY, captcha_type=captcha_type, websiteURL=websiteURL, websiteKey=websiteKey, proxy=proxy
60+
api_key=self.API_KEY,
61+
captcha_type=MtCaptchaTypeEnm.MtCaptchaTask,
62+
websiteURL=websiteURL,
63+
websiteKey=websiteKey,
64+
proxy=proxy,
6265
).captcha_handler()
6366
assert isinstance(resp, CaptchaResponseSer)
6467
assert resp.status == ResponseStatusEnm.Processing
6568
assert resp.errorId == 1
6669
assert resp.errorCode == "ERROR_PROXY_CONNECT_REFUSED"
6770
assert resp.solution is None
6871

69-
@pytest.mark.parametrize("captcha_type", captcha_types)
70-
async def test_aio_proxy_err(self, captcha_type: str):
72+
async def test_aio_proxy_err(self):
7173
resp = await MtCaptcha(
72-
api_key=self.API_KEY, captcha_type=captcha_type, websiteURL=websiteURL, websiteKey=websiteKey, proxy=proxy
74+
api_key=self.API_KEY,
75+
captcha_type=MtCaptchaTypeEnm.MtCaptchaTask,
76+
websiteURL=websiteURL,
77+
websiteKey=websiteKey,
78+
proxy=proxy,
7379
).aio_captcha_handler()
7480
assert isinstance(resp, CaptchaResponseSer)
7581
assert resp.status == ResponseStatusEnm.Processing

0 commit comments

Comments
 (0)