Skip to content
Snippets Groups Projects
Commit a4fae612 authored by Andreas Ellewsen's avatar Andreas Ellewsen
Browse files

Merge branch 'tests/fix-broken-test' into 'master'

Fix broken ou hierarchy test

See merge request !289
parents 63666de6 198c10f6
No related branches found
No related tags found
1 merge request!289Fix broken ou hierarchy test
Pipeline #117852 passed
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment