Skip to content

Commit 78ec2d5

Browse files
committed
use schema-agnostic assertion for fields_not_requested_test
1 parent 10ac9a9 commit 78ec2d5

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

tests/client/test_core_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,11 @@ def test_fields_not_requested_excludes_requested_fields(rester: BaseRester):
5151
from emmet.core.tasks import TaskDoc
5252

5353
rester.document_model = TaskDoc
54-
doc = {"task_id": "fakeid-1234", "state": "successful"}
54+
doc = {"task_id": "fakeid-1234"}
5555
requested_fields = list(TaskDoc.model_fields.keys())
5656

5757
_, _, fields_not_requested = rester._generate_returned_model(
5858
doc, requested_fields=requested_fields
5959
)
6060

61-
assert "dir_name" not in fields_not_requested
62-
assert "tags" not in fields_not_requested
61+
assert fields_not_requested == []

0 commit comments

Comments
 (0)