Skip to content

Commit a113035

Browse files
committed
test: change integration test for debug to avoid future failures
- Check for existence of keys and assert their types, instead of checking for their values
1 parent cbf27af commit a113035

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

tests/debug_test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ def test_retrieve(fake_debug: Debug) -> None:
4747

4848

4949
def test_actual_retrieve(actual_debug: Debug) -> None:
50-
"""Test that the Debug object can retrieve a debug on Typesense server."""
51-
json_response: DebugResponseSchema = {"state": 1, "version": "27.1"}
52-
50+
"""Test that the Debug object can retrieve a debug on Typesense server and verify response structure."""
5351
response = actual_debug.retrieve()
5452

55-
assert response == json_response
53+
assert "state" in response
54+
assert "version" in response
55+
56+
assert isinstance(response["state"], int)
57+
assert isinstance(response["version"], str)

0 commit comments

Comments
 (0)