Skip to content
Snippets Groups Projects

Fix broken ou hierarchy test

Merged Andreas Ellewsen requested to merge tests/fix-broken-test into master
1 file
+ 2
5
Compare changes
  • Side-by-side
  • Inline
@@ -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
Loading