Some bugfix in CI

This commit is contained in:
IgorVolochay
2026-08-25 16:03:02 +03:00
parent f88e821784
commit 2306855edd
2 changed files with 12 additions and 4 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ async def test_get_random_cards_valid():
params = {"user_id": EXIST_USER}
response = await client.get("/get_random_cards", params=params)
print(f"\nINPUT: endpoint=/get_random_cards\nOUTPUT: status={response.status_code} | json={response.json()}")
if response.status_code == 404 and BaseResponse.model_validate(response.json()).result == "No active cards":
if response.status_code == 404 and "No active cards" in str(BaseResponse.model_validate(response.json()).result):
global NO_ACTIVE_CARDS_STATUS
NO_ACTIVE_CARDS_STATUS = True
pytest.skip(reason="No active cards in MongoDB")