python3-anticaptcha/tests/main.py

29 lines
896 B
Python
Raw Normal View History

2019-09-05 21:07:36 +00:00
import os
2019-10-06 15:16:51 +00:00
# 1. `export anticaptcha_key=274832f8168a36019895a1e1174777c0`
2019-09-05 21:07:36 +00:00
class MainAntiCaptcha(object):
WRONG_QUEUE_ID = WRONG_TASK_ID = -1
def setup_class(self):
self.anticaptcha_key_fail = os.getenv("anticaptcha_key")[:5]
self.anticaptcha_key_true = os.getenv("anticaptcha_key")
self.server_ip = "85.255.8.26"
2019-09-29 22:11:51 +00:00
self.host = "https://pythoncaptcha.cloud"
self.image_url = self.host + "/static/image/common_image_example/620626.png"
2019-11-25 17:01:08 +00:00
self.ERROR_RESPONSE_JSON = {
"errorId": 1,
"errorCode": 123,
2019-11-25 17:05:46 +00:00
"errorDescription": "String with data",
2019-11-25 17:01:08 +00:00
}
self.VALID_RESPONSE_JSON = {
"errorId": 0,
"errorCode": 0,
"taskId": 456,
2019-11-25 17:05:46 +00:00
"errorDescription": "String with data",
2019-11-25 17:01:08 +00:00
}
2019-11-25 17:05:46 +00:00
self.VALID_RESPONSE_RESULT_JSON = {"errorId": 0, "status": "ready"}