From 5ee4335eb92f2dc35b31c208bce8d8e8aef9e5f2 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 20 Oct 2020 16:39:48 +0100 Subject: added org list hard-filtered by lead inspector --- ctrack/organisations/tests/test_views.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ctrack/organisations/tests/test_views.py') diff --git a/ctrack/organisations/tests/test_views.py b/ctrack/organisations/tests/test_views.py index a567fab..3584d96 100644 --- a/ctrack/organisations/tests/test_views.py +++ b/ctrack/organisations/tests/test_views.py @@ -16,6 +16,13 @@ from ..views import OrganisationListView pytestmark = pytest.mark.django_db +def test_organisation_by_inspector_view(inspector1, inspector2, client, submode): + org = OrganisationFactory(submode=submode, lead_inspector=inspector1, deputy_lead_inspector=inspector2) + client.force_login(inspector1) + response = client.get(reverse("organisations:list_by_inspector", args=[inspector1.id])) + assert response.status_code == 200 + + def test_meetings_in_organisation_detail_view(user, client, org_with_people): org_list_permission = Permission.objects.get(name="Can view organisation") assert user.user_permissions.count() == 0 -- cgit v1.2.3