python3-anticaptcha/tests/test_Callback.py

17 lines
536 B
Python
Raw Normal View History

2019-09-05 21:07:36 +00:00
import requests
2019-09-29 22:11:51 +00:00
from tests.main import MainAntiCaptcha
2019-09-05 21:07:36 +00:00
class TestAntiCaptcha(MainAntiCaptcha):
def test_callback_server(self):
# test server alive
response = requests.get(f"http://{self.server_ip}:8001/ping")
assert response.status_code == 200
# try register new queue
response = requests.post(
f"http://{self.server_ip}:8001/register_key",
json={"key": "fwefefefopewofkewopfkop", "vhost": "anticaptcha_vhost"},
)
assert response.status_code == 200