Skip to content

Commit

Permalink
Update test_image.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiDrang committed Dec 6, 2023
1 parent 85290aa commit 94d79ee
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def test_basic_link(self, save_format):
assert isinstance(result["solution"]["text"], str) is True
assert isinstance(result["taskId"], int) is True
else:
assert result["errorId"] == 1
assert result["status"] == "ERROR_CAPTCHA_UNSOLVABLE"
assert result["errorId"] in (1, 12)
assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"

@pytest.mark.parametrize("save_format", [SaveFormatsEnm.TEMP, SaveFormatsEnm.CONST])
def test_basic_file(self, save_format):
Expand All @@ -68,8 +68,8 @@ def test_basic_file(self, save_format):
assert isinstance(result["solution"]["text"], str) is True
assert isinstance(result["taskId"], int) is True
else:
assert result["errorId"] == 1
assert result["status"] == "ERROR_CAPTCHA_UNSOLVABLE"
assert result["errorId"] in (1, 12)
assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"

@pytest.mark.parametrize("save_format", [SaveFormatsEnm.TEMP, SaveFormatsEnm.CONST])
def test_basic_base64(self, save_format):
Expand All @@ -85,8 +85,8 @@ def test_basic_base64(self, save_format):
assert isinstance(result["solution"]["text"], str) is True
assert isinstance(result["taskId"], int) is True
else:
assert result["errorId"] == 1
assert result["status"] == "ERROR_CAPTCHA_UNSOLVABLE"
assert result["errorId"] in (1, 12)
assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
assert result.keys() == GetTaskResultResponseSer().to_dict().keys()

@pytest.mark.asyncio
Expand All @@ -102,8 +102,8 @@ async def test_aio_basic_link(self, save_format):
assert isinstance(result["solution"]["text"], str) is True
assert isinstance(result["taskId"], int) is True
else:
assert result["errorId"] == 1
assert result["status"] == "ERROR_CAPTCHA_UNSOLVABLE"
assert result["errorId"] in (1, 12)
assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
assert result.keys() == GetTaskResultResponseSer().to_dict().keys()

@pytest.mark.asyncio
Expand All @@ -119,8 +119,8 @@ async def test_aio_basic_file(self, save_format):
assert isinstance(result["solution"]["text"], str) is True
assert isinstance(result["taskId"], int) is True
else:
assert result["errorId"] == 1
assert result["status"] == "ERROR_CAPTCHA_UNSOLVABLE"
assert result["errorId"] in (1, 12)
assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
assert result.keys() == GetTaskResultResponseSer().to_dict().keys()

@pytest.mark.asyncio
Expand All @@ -137,8 +137,8 @@ async def test_aio_basic_base64(self, save_format):
assert isinstance(result["solution"]["text"], str) is True
assert isinstance(result["taskId"], int) is True
else:
assert result["errorId"] == 1
assert result["status"] == "ERROR_CAPTCHA_UNSOLVABLE"
assert result["errorId"] in (1, 12)
assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
assert result.keys() == GetTaskResultResponseSer().to_dict().keys()

"""
Expand Down

0 comments on commit 94d79ee

Please sign in to comment.