@@ -50,30 +50,34 @@ def test_no_validateId(self):
5050class TestBinanceCaptchaTaskBase (BaseTest ):
5151 def test_instance (self ):
5252 instance = Binance (
53- api_key = self .get_random_string ( 36 ) ,
53+ api_key = self .API_KEY ,
5454 captcha_type = BinanceCaptchaTaskEnm .BinanceCaptchaTask ,
5555 websiteURL = "https://www.milanuncios.com/" ,
5656 validateId = "3621a4fef82f4ab4a00e8b07465761c5" ,
5757 )
5858
5959 def test_solve (self ):
6060 instance = Binance (
61- api_key = self .get_random_string ( 36 ) ,
61+ api_key = self .API_KEY ,
6262 captcha_type = BinanceCaptchaTaskEnm .BinanceCaptchaTask ,
6363 websiteURL = "https://www.milanuncios.com/" ,
6464 validateId = "3621a4fef82f4ab4a00e8b07465761c5" ,
6565 ** {"proxyType" : "socks5" , "proxyAddress" : "72.217.216.239" , "proxyPort" : 4145 },
6666 )
6767 result = instance .captcha_handler ()
6868 assert isinstance (result , CaptchaResponseSer )
69+ assert result .errorId == 1
70+ assert result .errorCode == "ERROR_PROXY_CONNECT_REFUSED"
6971
7072 async def test_aio_solve (self ):
7173 instance = Binance (
72- api_key = self .get_random_string ( 36 ) ,
74+ api_key = self .API_KEY ,
7375 captcha_type = BinanceCaptchaTaskEnm .BinanceCaptchaTask ,
7476 websiteURL = "https://www.milanuncios.com/" ,
7577 validateId = "3621a4fef82f4ab4a00e8b07465761c5" ,
7678 ** {"proxyType" : "socks5" , "proxyAddress" : "72.217.216.239" , "proxyPort" : 4145 },
7779 )
7880 result = await instance .aio_captcha_handler ()
7981 assert isinstance (result , CaptchaResponseSer )
82+ assert result .errorId == 1
83+ assert result .errorCode == "ERROR_PROXY_CONNECT_REFUSED"
0 commit comments