@pytest.mark.django_db
def test_get_concept(client, model):
model.all_objects.create(
url="https://example.com/test",
id=UUID(int=0),
pref_label={"en": "Field"},
**common_fields,
)
url = get_model_url(model)
resp = client.get(url, {"include_nulls": True})
assert resp.data["results"] == [
{
"id": "00000000-0000-0000-0000-000000000000",
"url": "https://example.com/test",
"in_scheme": "https://example.com",
"pref_label": {"en": "Field"},
"broader": [],
"narrower": [],
"deprecated": None,
**{
field: extra_field_values[field]
for field in getattr(model, "serializer_extra_fields", [])
},
}
]