Fix aio tests

This commit is contained in:
Andrei 2019-10-06 18:38:28 +03:00
parent 6f64e61ae3
commit 37f41d10c5
2 changed files with 3 additions and 3 deletions

View File

@ -134,7 +134,7 @@ class TestAntiCaptcha(MainAntiCaptcha):
@pytest.mark.asyncio
async def test_fail_aioimagecaptcha_value(self):
with pytest.raises(ValueError):
assert ImageToTextTask.ImageToTextTask(
assert await ImageToTextTask.ImageToTextTask(
anticaptcha_key=self.anticaptcha_key_fail,
save_format=self.WRONG_SAVE_FORMAT,
)

View File

@ -121,7 +121,7 @@ class TestAntiCaptcha(MainAntiCaptcha):
anticaptcha_key=self.anticaptcha_key_fail
)
with pytest.raises(ValueError):
assert recaptcha.captcha_handler(
assert await recaptcha.captcha_handler(
websiteURL="https://www.google.com/recaptcha/api2/demo",
websiteKey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
minScore=0.1,
@ -134,7 +134,7 @@ class TestAntiCaptcha(MainAntiCaptcha):
anticaptcha_key=self.anticaptcha_key_fail
) as recaptcha:
with pytest.raises(ValueError):
assert recaptcha.captcha_handler(
assert await recaptcha.captcha_handler(
websiteURL="https://www.google.com/recaptcha/api2/demo",
websiteKey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
minScore=0.1,