Skip to content

Commit 21bd712

Browse files
author
Andrei
committed
Update test_datadome_slider.py
1 parent 4fe1450 commit 21bd712

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

tests/test_datadome_slider.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def test_params(self, proxy_type: str):
2828
api_key=self.API_KEY,
2929
websiteURL=websiteURL,
3030
captchaUrl=captchaUrl,
31+
userAgent=self.get_random_string(36),
3132
proxyAddress=self.proxyAddress,
3233
proxyType=proxy_type,
3334
proxyPort=self.proxyPort,
@@ -39,6 +40,7 @@ def test_params_context(self, proxy_type: str):
3940
api_key=self.API_KEY,
4041
websiteURL=websiteURL,
4142
captchaUrl=captchaUrl,
43+
userAgent=self.get_random_string(36),
4244
proxyAddress=self.proxyAddress,
4345
proxyType=proxy_type,
4446
proxyPort=self.proxyPort,
@@ -52,31 +54,33 @@ def test_params_context(self, proxy_type: str):
5254
@pytest.mark.parametrize("proxy_type", BaseTest.proxyTypes)
5355
async def test_aio_proxy_err(self, proxy_type: str):
5456
resp = await DatadomeSlider(
55-
api_key=self.get_random_string(36),
57+
api_key=self.API_KEY,
5658
websiteURL=websiteURL,
5759
captchaUrl=captchaUrl,
60+
userAgent=self.get_random_string(36),
5861
proxyAddress=self.proxyAddress,
5962
proxyType=proxy_type,
6063
proxyPort=self.proxyPort,
6164
).aio_captcha_handler()
6265
assert isinstance(resp, CaptchaResponseSer)
6366
assert resp.status == ResponseStatusEnm.Processing
6467
assert resp.errorId == 1
65-
assert resp.errorCode == "ERROR_INVALID_TASK_DATA"
68+
assert resp.errorCode == "ERROR_PROXY_CONNECT_REFUSED"
6669
assert resp.solution is None
6770

6871
@pytest.mark.parametrize("proxy_type", BaseTest.proxyTypes)
6972
def test_proxy_err(self, proxy_type: str):
7073
resp = DatadomeSlider(
71-
api_key=self.get_random_string(36),
74+
api_key=self.API_KEY,
7275
websiteURL=websiteURL,
7376
captchaUrl=captchaUrl,
77+
userAgent=self.get_random_string(36),
7478
proxyAddress=self.proxyAddress,
7579
proxyType=proxy_type,
7680
proxyPort=self.proxyPort,
7781
).captcha_handler()
7882
assert isinstance(resp, CaptchaResponseSer)
7983
assert resp.status == ResponseStatusEnm.Processing
8084
assert resp.errorId == 1
81-
assert resp.errorCode == "ERROR_INVALID_TASK_DATA"
85+
assert resp.errorCode == "ERROR_PROXY_CONNECT_REFUSED"
8286
assert resp.solution is None

0 commit comments

Comments
 (0)