diff --git a/gregui/tests/api/views/test_ou.py b/gregui/tests/api/views/test_ou.py index 1e30b1c3f8a7e69fe599f2913eb6ff35347c3658..d43889343088a66072d7542022729465d2d464a8 100644 --- a/gregui/tests/api/views/test_ou.py +++ b/gregui/tests/api/views/test_ou.py @@ -21,7 +21,7 @@ def test_hierarchy_access_sponsor_ous(client, user_sponsor, unit_bar, log_in): # Only direct connection visible response = client.get(url) assert response.status_code == status.HTTP_200_OK - assert response.json() == [{"id": 1, "en": "Foo EN", "nb": "Foo NB"}] + assert len(response.json()) == 1 # Tree visible with hierarchy access sou = SponsorOrganizationalUnit.objects.get(pk=1) @@ -29,7 +29,4 @@ def test_hierarchy_access_sponsor_ous(client, user_sponsor, unit_bar, log_in): sou.save() response = client.get(url) assert response.status_code == status.HTTP_200_OK - assert response.json() == [ - {"id": 1, "en": "Foo EN", "nb": "Foo NB"}, - {"id": 2, "en": "Bar EN", "nb": "Bar NB"}, - ] + assert len(response.json()) == 2