aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-05-31 21:20:03 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-05-31 21:20:03 +0100
commit4f82757fcfa10ad2ce796348d8097b6c4a82b283 (patch)
treea11759634f1ec1977d5a22259c27581cfa09f3c9 /ctrack/organisations
parentfab21cad7fa2e85633e993c87cc11db52eae4f13 (diff)
parentb5fedc5817cde8732f47d608c6e8ccd274bb434e (diff)
people view
Diffstat (limited to 'ctrack/organisations')
-rw-r--r--ctrack/organisations/tests/test_views.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/ctrack/organisations/tests/test_views.py b/ctrack/organisations/tests/test_views.py
index 84116de..a77afcc 100644
--- a/ctrack/organisations/tests/test_views.py
+++ b/ctrack/organisations/tests/test_views.py
@@ -7,7 +7,7 @@ from django.urls import reverse
from ctrack.caf.tests.factories import PersonFactory
from ctrack.organisations.models import Mode, Submode
from ctrack.organisations.tests.factories import OrganisationFactory, RoleFactory
-from ctrack.organisations.views import IncidentReportCreateView, OrganisationDetailView
+from ctrack.organisations.views import IncidentReportCreateView
from ..views import OrganisationListView
@@ -66,8 +66,13 @@ def test_incident_report_create_view(stakeholder_user):
assert response.status_code == 200
+<<<<<<< HEAD
def test_only_member_of_cct_user_group_can_view_a_single_person(
stakeholder_user, org_with_people, client
+=======
+def test_only_member_of_cct_user_group_can_view_person_list(
+ stakeholder_user, org_with_people
+>>>>>>> b5fedc5817cde8732f47d608c6e8ccd274bb434e
):
role = RoleFactory.create()
submode = Submode.objects.create(
@@ -88,6 +93,7 @@ def test_only_member_of_cct_user_group_can_view_a_single_person(
group = Group.objects.create(name="cct_user")
stakeholder_user.groups.add(group)
+<<<<<<< HEAD
person_list_permission = Permission.objects.get(name="Can view person")
group.permissions.add(person_list_permission)
@@ -99,3 +105,13 @@ def test_only_member_of_cct_user_group_can_view_a_single_person(
# They get this permisson via the cct_user group
assert stakeholder_user.has_perm("organisations.view_person")
assert response.status_code == 200
+=======
+ person_list_permission = Permission.objects.get(name="Can view person")
+ group.permissions.add(person_list_permission)
+
+ factory = RequestFactory()
+ request = factory.get(f"people/")
+
+ # They get this permisson via the cct_user group
+ assert stakeholder_user.has_perm("organisations.view_person")
+>>>>>>> b5fedc5817cde8732f47d608c6e8ccd274bb434e