@@ -50,30 +50,34 @@ def test_no_validateId(self):
50
50
class TestBinanceCaptchaTaskBase (BaseTest ):
51
51
def test_instance (self ):
52
52
instance = Binance (
53
- api_key = self .get_random_string ( 36 ) ,
53
+ api_key = self .API_KEY ,
54
54
captcha_type = BinanceCaptchaTaskEnm .BinanceCaptchaTask ,
55
55
websiteURL = "https://www.milanuncios.com/" ,
56
56
validateId = "3621a4fef82f4ab4a00e8b07465761c5" ,
57
57
)
58
58
59
59
def test_solve (self ):
60
60
instance = Binance (
61
- api_key = self .get_random_string ( 36 ) ,
61
+ api_key = self .API_KEY ,
62
62
captcha_type = BinanceCaptchaTaskEnm .BinanceCaptchaTask ,
63
63
websiteURL = "https://www.milanuncios.com/" ,
64
64
validateId = "3621a4fef82f4ab4a00e8b07465761c5" ,
65
65
** {"proxyType" : "socks5" , "proxyAddress" : "72.217.216.239" , "proxyPort" : 4145 },
66
66
)
67
67
result = instance .captcha_handler ()
68
68
assert isinstance (result , CaptchaResponseSer )
69
+ assert result .errorId == 1
70
+ assert result .errorCode == "ERROR_PROXY_CONNECT_REFUSED"
69
71
70
72
async def test_aio_solve (self ):
71
73
instance = Binance (
72
- api_key = self .get_random_string ( 36 ) ,
74
+ api_key = self .API_KEY ,
73
75
captcha_type = BinanceCaptchaTaskEnm .BinanceCaptchaTask ,
74
76
websiteURL = "https://www.milanuncios.com/" ,
75
77
validateId = "3621a4fef82f4ab4a00e8b07465761c5" ,
76
78
** {"proxyType" : "socks5" , "proxyAddress" : "72.217.216.239" , "proxyPort" : 4145 },
77
79
)
78
80
result = await instance .aio_captcha_handler ()
79
81
assert isinstance (result , CaptchaResponseSer )
82
+ assert result .errorId == 1
83
+ assert result .errorCode == "ERROR_PROXY_CONNECT_REFUSED"
0 commit comments