From d58fc099583405947a2a4fb933abbbd223cf373a Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Tue, 14 Jan 2025 22:39:21 +0000 Subject: [PATCH] Remove viewer user from API tests --- temba/api/v2/tests/test_archives.py | 2 +- temba/api/v2/tests/test_base.py | 6 +++--- temba/api/v2/tests/test_boundaries.py | 2 +- temba/api/v2/tests/test_broadcasts.py | 4 ++-- temba/api/v2/tests/test_channel_events.py | 2 +- temba/api/v2/tests/test_channels.py | 2 +- temba/api/v2/tests/test_classifiers.py | 4 ++-- temba/api/v2/tests/test_contact_actions.py | 6 +++--- temba/api/v2/tests/test_contacts.py | 22 +++++++++++----------- temba/api/v2/tests/test_fields.py | 4 ++-- temba/api/v2/tests/test_flow_starts.py | 4 ++-- temba/api/v2/tests/test_flows.py | 2 +- temba/api/v2/tests/test_globals.py | 4 ++-- temba/api/v2/tests/test_groups.py | 6 +++--- temba/api/v2/tests/test_labels.py | 6 +++--- temba/api/v2/tests/test_media.py | 2 +- temba/api/v2/tests/test_message_actions.py | 2 +- temba/api/v2/tests/test_messages.py | 8 +++++--- temba/api/v2/tests/test_optins.py | 4 ++-- temba/api/v2/tests/test_resthooks.py | 10 +++++----- temba/api/v2/tests/test_runs.py | 4 ++-- temba/api/v2/tests/test_ticket_actions.py | 2 +- temba/api/v2/tests/test_tickets.py | 2 +- temba/api/v2/tests/test_topics.py | 4 ++-- temba/api/v2/tests/test_users.py | 2 +- temba/api/v2/tests/test_workspace.py | 2 +- 26 files changed, 60 insertions(+), 58 deletions(-) diff --git a/temba/api/v2/tests/test_archives.py b/temba/api/v2/tests/test_archives.py index 5674a98f4ff..be0edf157b2 100644 --- a/temba/api/v2/tests/test_archives.py +++ b/temba/api/v2/tests/test_archives.py @@ -11,7 +11,7 @@ class ArchivesEndpointTest(APITest): def test_endpoint(self): endpoint_url = reverse("api.v2.archives") + ".json" - self.assertGetNotPermitted(endpoint_url, [None, self.user, self.agent]) + self.assertGetNotPermitted(endpoint_url, [None, self.agent]) self.assertPostNotAllowed(endpoint_url) self.assertDeleteNotAllowed(endpoint_url) diff --git a/temba/api/v2/tests/test_base.py b/temba/api/v2/tests/test_base.py index 5e255fabe02..5352df5e930 100644 --- a/temba/api/v2/tests/test_base.py +++ b/temba/api/v2/tests/test_base.py @@ -238,12 +238,12 @@ def test_explorer(self): response = self.client.get(explorer_url) self.assertLoginRedirect(response) - # viewers can't access - self.login(self.user) + # agents can't access + self.login(self.agent) response = self.client.get(explorer_url) self.assertLoginRedirect(response) - # editors and administrators can + # editors and administrators can access self.login(self.editor) response = self.client.get(explorer_url) self.assertEqual(200, response.status_code) diff --git a/temba/api/v2/tests/test_boundaries.py b/temba/api/v2/tests/test_boundaries.py index 2a2f2bf1937..35373ca4d44 100644 --- a/temba/api/v2/tests/test_boundaries.py +++ b/temba/api/v2/tests/test_boundaries.py @@ -24,7 +24,7 @@ def test_endpoint(self): self.assertGet( endpoint_url, - [self.user, self.editor, self.admin], + [self.editor, self.admin], results=[ { "osm_id": "1708283", diff --git a/temba/api/v2/tests/test_broadcasts.py b/temba/api/v2/tests/test_broadcasts.py index ae7b67f7a47..3290c81313e 100644 --- a/temba/api/v2/tests/test_broadcasts.py +++ b/temba/api/v2/tests/test_broadcasts.py @@ -17,7 +17,7 @@ def test_endpoint(self, mr_mocks): endpoint_url = reverse("api.v2.broadcasts") + ".json" self.assertGetNotPermitted(endpoint_url, [None, self.agent]) - self.assertPostNotPermitted(endpoint_url, [None, self.user, self.agent]) + self.assertPostNotPermitted(endpoint_url, [None, self.agent]) self.assertDeleteNotAllowed(endpoint_url) self.create_channel("FBA", "Facebook Channel", "billy_bob") @@ -56,7 +56,7 @@ def test_endpoint(self, mr_mocks): # no filtering response = self.assertGet( endpoint_url, - [self.user, self.editor, self.admin], + [self.editor, self.admin], results=[bcast4, bcast3, bcast2, bcast1], num_queries=self.BASE_SESSION_QUERIES + 4, ) diff --git a/temba/api/v2/tests/test_channel_events.py b/temba/api/v2/tests/test_channel_events.py index ef5316772f8..596f74c7a75 100644 --- a/temba/api/v2/tests/test_channel_events.py +++ b/temba/api/v2/tests/test_channel_events.py @@ -27,7 +27,7 @@ def test_endpoint(self): # no filtering response = self.assertGet( endpoint_url, - [self.user, self.editor, self.admin], + [self.editor, self.admin], results=[call4, call3, call2, call1], num_queries=self.BASE_SESSION_QUERIES + 3, ) diff --git a/temba/api/v2/tests/test_channels.py b/temba/api/v2/tests/test_channels.py index 6cb1bb54048..4abf5de58a9 100644 --- a/temba/api/v2/tests/test_channels.py +++ b/temba/api/v2/tests/test_channels.py @@ -25,7 +25,7 @@ def test_endpoint(self): # no filtering self.assertGet( endpoint_url, - [self.user, self.editor, self.admin], + [self.editor, self.admin], results=[ { "uuid": str(facebook.uuid), diff --git a/temba/api/v2/tests/test_classifiers.py b/temba/api/v2/tests/test_classifiers.py index b0c19184142..e33185b60a5 100644 --- a/temba/api/v2/tests/test_classifiers.py +++ b/temba/api/v2/tests/test_classifiers.py @@ -33,7 +33,7 @@ def test_endpoint(self): # no filtering self.assertGet( endpoint_url, - [self.user, self.editor, self.admin], + [self.editor, self.admin], results=[ { "name": "Booker", @@ -50,4 +50,4 @@ def test_endpoint(self): self.assertGet(endpoint_url + "?uuid=09d23a05-47fe-11e4-bfe9-b8f6b119e9ab", [self.editor], results=[]) # filter by uuid present - self.assertGet(endpoint_url + f"?uuid={c1.uuid}", [self.user, self.editor, self.admin], results=[c1]) + self.assertGet(endpoint_url + f"?uuid={c1.uuid}", [self.editor, self.admin], results=[c1]) diff --git a/temba/api/v2/tests/test_contact_actions.py b/temba/api/v2/tests/test_contact_actions.py index ae73325d382..97ca63f04ae 100644 --- a/temba/api/v2/tests/test_contact_actions.py +++ b/temba/api/v2/tests/test_contact_actions.py @@ -16,7 +16,7 @@ def test_endpoint(self, mr_mocks): endpoint_url = reverse("api.v2.contact_actions") + ".json" self.assertGetNotAllowed(endpoint_url) - self.assertPostNotPermitted(endpoint_url, [None, self.user]) + self.assertPostNotPermitted(endpoint_url, [None]) self.assertDeleteNotAllowed(endpoint_url) for contact in Contact.objects.all(): @@ -29,8 +29,8 @@ def test_endpoint(self, mr_mocks): contact3 = self.create_contact("Cat", phone="+250788000003") contact4 = self.create_contact("Don", phone="+250788000004") # a blocked contact contact5 = self.create_contact("Eve", phone="+250788000005") # a deleted contact - contact4.block(self.user) - contact5.release(self.user) + contact4.block(self.editor) + contact5.release(self.editor) group = self.create_group("Testers") self.create_field("isdeveloper", "Is developer") diff --git a/temba/api/v2/tests/test_contacts.py b/temba/api/v2/tests/test_contacts.py index c830f7b77b7..6d930a9c3fa 100644 --- a/temba/api/v2/tests/test_contacts.py +++ b/temba/api/v2/tests/test_contacts.py @@ -23,8 +23,8 @@ def test_endpoint(self, mr_mocks): endpoint_url = reverse("api.v2.contacts") + ".json" self.assertGetNotPermitted(endpoint_url, [None]) - self.assertPostNotPermitted(endpoint_url, [None, self.user]) - self.assertDeleteNotPermitted(endpoint_url, [None, self.user, self.agent]) + self.assertPostNotPermitted(endpoint_url, [None]) + self.assertDeleteNotPermitted(endpoint_url, [None, self.agent]) # create some more contacts (in addition to Joe and Frank) contact1 = self.create_contact( @@ -36,9 +36,9 @@ def test_endpoint(self, mr_mocks): "Don", phone="0788000004", language="fra", fields={"nickname": "Donnie", "gender": "male"} ) - contact1.stop(self.user) - contact2.block(self.user) - contact3.release(self.user) + contact1.stop(self.editor) + contact2.block(self.editor) + contact3.release(self.editor) # put some contacts in a group group = self.create_group("Customers", contacts=[self.joe, contact4]) @@ -64,7 +64,7 @@ def test_endpoint(self, mr_mocks): # no filtering response = self.assertGet( endpoint_url, - [self.user, self.editor, self.admin, self.agent], + [self.editor, self.admin, self.agent], results=[contact4, self.joe, contact2, contact1, self.frank], num_queries=self.BASE_SESSION_QUERIES + 7, ) @@ -100,7 +100,7 @@ def test_endpoint(self, mr_mocks): # with expanded URNs response = self.assertGet( endpoint_url + "?expand_urns=true", - [self.user], + [self.editor], results=[contact4, self.joe, contact2, contact1, self.frank], ) self.assertEqual( @@ -133,14 +133,14 @@ def test_endpoint(self, mr_mocks): # reversed response = self.assertGet( endpoint_url + "?reverse=true", - [self.user], + [self.editor], results=[self.frank, contact1, contact2, self.joe, contact4], ) with self.anonymous(self.org): response = self.assertGet( endpoint_url, - [self.user, self.editor, self.admin, self.agent], + [self.editor, self.admin, self.agent], results=[contact4, self.joe, contact2, contact1, self.frank], num_queries=self.BASE_SESSION_QUERIES + 7, ) @@ -168,7 +168,7 @@ def test_endpoint(self, mr_mocks): # with expanded URNs response = self.assertGet( endpoint_url + "?expand_urns=true", - [self.user], + [self.editor], results=[contact4, self.joe, contact2, contact1, self.frank], ) self.assertEqual( @@ -497,7 +497,7 @@ def test_endpoint(self, mr_mocks): self.assertEqual(jean.urns.count(), 100) # try to move a blocked contact into a group - jean.block(self.user) + jean.block(self.editor) self.assertPost( endpoint_url + f"?uuid={jean.uuid}", self.editor, diff --git a/temba/api/v2/tests/test_fields.py b/temba/api/v2/tests/test_fields.py index e35517d50d9..eeaaf7cf34e 100644 --- a/temba/api/v2/tests/test_fields.py +++ b/temba/api/v2/tests/test_fields.py @@ -13,7 +13,7 @@ def test_endpoint(self): endpoint_url = reverse("api.v2.fields") + ".json" self.assertGetNotPermitted(endpoint_url, [None]) - self.assertPostNotPermitted(endpoint_url, [None, self.user]) + self.assertPostNotPermitted(endpoint_url, [None, self.agent]) self.assertDeleteNotAllowed(endpoint_url) nick_name = self.create_field("nick_name", "Nick Name", agent_access=ContactField.ACCESS_EDIT) @@ -43,7 +43,7 @@ def test_endpoint(self): # no filtering self.assertGet( endpoint_url, - [self.user, self.editor], + [self.editor, self.admin], results=[ { "key": "registered", diff --git a/temba/api/v2/tests/test_flow_starts.py b/temba/api/v2/tests/test_flow_starts.py index 31a6a7cda3f..8c404346ce3 100644 --- a/temba/api/v2/tests/test_flow_starts.py +++ b/temba/api/v2/tests/test_flow_starts.py @@ -14,7 +14,7 @@ def test_endpoint(self, mock_async_start): endpoint_url = reverse("api.v2.flow_starts") + ".json" self.assertGetNotPermitted(endpoint_url, [None, self.agent]) - self.assertPostNotPermitted(endpoint_url, [None, self.agent, self.user]) + self.assertPostNotPermitted(endpoint_url, [None, self.agent]) self.assertDeleteNotAllowed(endpoint_url) flow = self.create_flow("Test") @@ -226,7 +226,7 @@ def test_endpoint(self, mock_async_start): # check fetching with no filtering response = self.assertGet( endpoint_url, - [self.user, self.editor], + [self.editor, self.admin], results=[start4, start3, start2, start1], num_queries=self.BASE_SESSION_QUERIES + 5, ) diff --git a/temba/api/v2/tests/test_flows.py b/temba/api/v2/tests/test_flows.py index 762561b2a1c..730e2a97e3c 100644 --- a/temba/api/v2/tests/test_flows.py +++ b/temba/api/v2/tests/test_flows.py @@ -40,7 +40,7 @@ def test_endpoint(self): # no filtering self.assertGet( endpoint_url, - [self.user, self.editor], + [self.editor, self.admin], results=[ { "uuid": archived.uuid, diff --git a/temba/api/v2/tests/test_globals.py b/temba/api/v2/tests/test_globals.py index f30bd40d017..164e33d9d97 100644 --- a/temba/api/v2/tests/test_globals.py +++ b/temba/api/v2/tests/test_globals.py @@ -13,7 +13,7 @@ def test_endpoint(self): endpoint_url = reverse("api.v2.globals") + ".json" self.assertGetNotPermitted(endpoint_url, [None, self.agent]) - self.assertPostNotPermitted(endpoint_url, [None, self.user, self.agent]) + self.assertPostNotPermitted(endpoint_url, [None, self.agent]) self.assertDeleteNotAllowed(endpoint_url) # create some globals @@ -29,7 +29,7 @@ def test_endpoint(self): # check no filtering response = self.assertGet( endpoint_url, - [self.user, self.editor], + [self.editor, self.admin], results=[ { "key": "access_token", diff --git a/temba/api/v2/tests/test_groups.py b/temba/api/v2/tests/test_groups.py index ccdfcae5cd4..79278f7abf0 100644 --- a/temba/api/v2/tests/test_groups.py +++ b/temba/api/v2/tests/test_groups.py @@ -16,8 +16,8 @@ def test_endpoint(self, mr_mocks): endpoint_url = reverse("api.v2.groups") + ".json" self.assertGetNotPermitted(endpoint_url, [None]) - self.assertPostNotPermitted(endpoint_url, [None, self.user, self.agent]) - self.assertDeleteNotPermitted(endpoint_url, [None, self.user, self.agent]) + self.assertPostNotPermitted(endpoint_url, [None, self.agent]) + self.assertDeleteNotPermitted(endpoint_url, [None, self.agent]) frank = self.create_contact("Frank", urns=["facebook:123456"]) self.create_field("isdeveloper", "Is developer") @@ -38,7 +38,7 @@ def test_endpoint(self, mr_mocks): # no filtering self.assertGet( endpoint_url, - [self.user, self.editor], + [self.editor, self.admin], results=[ { "uuid": dynamic.uuid, diff --git a/temba/api/v2/tests/test_labels.py b/temba/api/v2/tests/test_labels.py index 8e7e176bc8a..fdcdf442104 100644 --- a/temba/api/v2/tests/test_labels.py +++ b/temba/api/v2/tests/test_labels.py @@ -11,8 +11,8 @@ def test_endpoint(self): endpoint_url = reverse("api.v2.labels") + ".json" self.assertGetNotPermitted(endpoint_url, [None, self.agent]) - self.assertPostNotPermitted(endpoint_url, [None, self.user, self.agent]) - self.assertDeleteNotPermitted(endpoint_url + "?uuid=123", [None, self.user, self.agent]) + self.assertPostNotPermitted(endpoint_url, [None, self.agent]) + self.assertDeleteNotPermitted(endpoint_url + "?uuid=123", [None, self.agent]) frank = self.create_contact("Frank", urns=["tel:123456"]) important = self.create_label("Important") @@ -31,7 +31,7 @@ def test_endpoint(self): # no filtering self.assertGet( endpoint_url, - [self.user, self.editor], + [self.editor, self.admin], results=[ {"uuid": str(feedback.uuid), "name": "Feedback", "count": 0}, {"uuid": str(important.uuid), "name": "Important", "count": 1}, diff --git a/temba/api/v2/tests/test_media.py b/temba/api/v2/tests/test_media.py index 869c6544b44..f1a7b559013 100644 --- a/temba/api/v2/tests/test_media.py +++ b/temba/api/v2/tests/test_media.py @@ -15,7 +15,7 @@ def test_endpoint(self): endpoint_url = reverse("api.v2.media") + ".json" self.assertGetNotAllowed(endpoint_url) - self.assertPostNotPermitted(endpoint_url, [None, self.user]) + self.assertPostNotPermitted(endpoint_url, [None]) self.assertDeleteNotAllowed(endpoint_url) def upload(user, filename: str): diff --git a/temba/api/v2/tests/test_message_actions.py b/temba/api/v2/tests/test_message_actions.py index c55289884b9..a5d5ccb79c4 100644 --- a/temba/api/v2/tests/test_message_actions.py +++ b/temba/api/v2/tests/test_message_actions.py @@ -10,7 +10,7 @@ def test_endpoint(self): endpoint_url = reverse("api.v2.message_actions") + ".json" self.assertGetNotAllowed(endpoint_url) - self.assertPostNotPermitted(endpoint_url, [None, self.user, self.agent]) + self.assertPostNotPermitted(endpoint_url, [None, self.agent]) self.assertDeleteNotAllowed(endpoint_url) # create some messages to act on diff --git a/temba/api/v2/tests/test_messages.py b/temba/api/v2/tests/test_messages.py index a75e5d6c701..199e0c0b710 100644 --- a/temba/api/v2/tests/test_messages.py +++ b/temba/api/v2/tests/test_messages.py @@ -17,7 +17,7 @@ def test_endpoint(self, mr_mocks): endpoint_url = reverse("api.v2.messages") + ".json" self.assertGetNotPermitted(endpoint_url, [None, self.agent]) - self.assertPostNotPermitted(endpoint_url, [None, self.user]) + self.assertPostNotPermitted(endpoint_url, [None]) self.assertDeleteNotAllowed(endpoint_url) joe = self.create_contact("Joe Blow", phone="+250788123123") @@ -69,7 +69,7 @@ def test_endpoint(self, mr_mocks): # default response is all messages sorted by created_on self.assertGet( endpoint_url, - [self.user, self.editor, self.admin], + [self.editor, self.admin], results=[joe_msg4, frank_msg4, frank_msg3, joe_msg3, frank_msg2, joe_msg2, frank_msg1, joe_msg1], num_queries=self.BASE_SESSION_QUERIES + 6, ) @@ -153,7 +153,9 @@ def test_endpoint(self, mr_mocks): ) # filter by broadcast - broadcast = self.create_broadcast(self.user, {"eng": {"text": "A beautiful broadcast"}}, contacts=[joe, frank]) + broadcast = self.create_broadcast( + self.editor, {"eng": {"text": "A beautiful broadcast"}}, contacts=[joe, frank] + ) self.assertGet( endpoint_url + f"?broadcast={broadcast.id}", [self.editor], diff --git a/temba/api/v2/tests/test_optins.py b/temba/api/v2/tests/test_optins.py index 4b9e8696e49..f4ec37df544 100644 --- a/temba/api/v2/tests/test_optins.py +++ b/temba/api/v2/tests/test_optins.py @@ -12,7 +12,7 @@ def test_endpoint(self): endpoint_url = reverse("api.v2.optins") + ".json" self.assertGetNotPermitted(endpoint_url, [None, self.agent]) - self.assertPostNotPermitted(endpoint_url, [None, self.agent, self.user]) + self.assertPostNotPermitted(endpoint_url, [None, self.agent]) self.assertDeleteNotAllowed(endpoint_url) # create some optins @@ -23,7 +23,7 @@ def test_endpoint(self): # no filtering self.assertGet( endpoint_url, - [self.user, self.editor], + [self.editor, self.admin], results=[ { "uuid": str(offers.uuid), diff --git a/temba/api/v2/tests/test_resthooks.py b/temba/api/v2/tests/test_resthooks.py index 771fc818bb3..69bb896367e 100644 --- a/temba/api/v2/tests/test_resthooks.py +++ b/temba/api/v2/tests/test_resthooks.py @@ -12,15 +12,15 @@ def test_endpoint(self): subs_url = reverse("api.v2.resthook_subscribers") + ".json" events_url = reverse("api.v2.resthook_events") + ".json" - self.assertGetNotPermitted(hooks_url, [None, self.agent, self.user]) + self.assertGetNotPermitted(hooks_url, [None, self.agent]) self.assertPostNotAllowed(hooks_url) self.assertDeleteNotAllowed(hooks_url) - self.assertGetNotPermitted(subs_url, [None, self.agent, self.user]) - self.assertPostNotPermitted(subs_url, [None, self.agent, self.user]) - self.assertDeleteNotPermitted(subs_url, [None, self.agent, self.user]) + self.assertGetNotPermitted(subs_url, [None, self.agent]) + self.assertPostNotPermitted(subs_url, [None, self.agent]) + self.assertDeleteNotPermitted(subs_url, [None, self.agent]) - self.assertGetNotPermitted(events_url, [None, self.agent, self.user]) + self.assertGetNotPermitted(events_url, [None, self.agent]) self.assertPostNotAllowed(events_url) self.assertDeleteNotAllowed(events_url) diff --git a/temba/api/v2/tests/test_runs.py b/temba/api/v2/tests/test_runs.py index 9ddfe7e502f..46108e7af87 100644 --- a/temba/api/v2/tests/test_runs.py +++ b/temba/api/v2/tests/test_runs.py @@ -18,7 +18,7 @@ def test_endpoint(self): self.assertDeleteNotAllowed(endpoint_url) flow1 = self.get_flow("color_v13") - flow2 = flow1.clone(self.user) + flow2 = flow1.clone(self.editor) flow1_nodes = flow1.get_definition()["nodes"] color_prompt = flow1_nodes[0] @@ -77,7 +77,7 @@ def test_endpoint(self): # no filtering response = self.assertGet( endpoint_url, - [self.user, self.editor], + [self.editor, self.admin], results=[joe_run3, joe_run2, frank_run2, frank_run1, joe_run1], num_queries=self.BASE_SESSION_QUERIES + 6, ) diff --git a/temba/api/v2/tests/test_ticket_actions.py b/temba/api/v2/tests/test_ticket_actions.py index 4fb14f84465..ec080f0aed6 100644 --- a/temba/api/v2/tests/test_ticket_actions.py +++ b/temba/api/v2/tests/test_ticket_actions.py @@ -14,7 +14,7 @@ def test_endpoint(self, mr_mocks): endpoint_url = reverse("api.v2.ticket_actions") + ".json" self.assertGetNotAllowed(endpoint_url) - self.assertPostNotPermitted(endpoint_url, [None, self.user]) + self.assertPostNotPermitted(endpoint_url, [None]) self.assertDeleteNotAllowed(endpoint_url) # create some tickets diff --git a/temba/api/v2/tests/test_tickets.py b/temba/api/v2/tests/test_tickets.py index 51511b19542..b737e9bdb9b 100644 --- a/temba/api/v2/tests/test_tickets.py +++ b/temba/api/v2/tests/test_tickets.py @@ -34,7 +34,7 @@ def test_endpoint(self, mr_mocks): # no filtering self.assertGet( endpoint_url, - [self.user, self.editor, self.admin, self.agent], + [self.editor, self.admin, self.agent], results=[ { "uuid": str(ticket3.uuid), diff --git a/temba/api/v2/tests/test_topics.py b/temba/api/v2/tests/test_topics.py index 2d32140a2b8..734af3726b6 100644 --- a/temba/api/v2/tests/test_topics.py +++ b/temba/api/v2/tests/test_topics.py @@ -13,7 +13,7 @@ def test_endpoint(self): endpoint_url = reverse("api.v2.topics") + ".json" self.assertGetNotPermitted(endpoint_url, [None]) - self.assertPostNotPermitted(endpoint_url, [None, self.agent, self.user]) + self.assertPostNotPermitted(endpoint_url, [None, self.agent]) self.assertDeleteNotAllowed(endpoint_url) # create some topics @@ -27,7 +27,7 @@ def test_endpoint(self): # no filtering self.assertGet( endpoint_url, - [self.user, self.editor], + [self.editor, self.admin], results=[ { "uuid": str(sales.uuid), diff --git a/temba/api/v2/tests/test_users.py b/temba/api/v2/tests/test_users.py index c448b946ee9..579757bcb8f 100644 --- a/temba/api/v2/tests/test_users.py +++ b/temba/api/v2/tests/test_users.py @@ -15,7 +15,7 @@ def test_endpoint(self): self.assertGet( endpoint_url, - [self.agent, self.user, self.editor, self.admin], + [self.agent, self.editor, self.admin], results=[ { "email": "agent@textit.com", diff --git a/temba/api/v2/tests/test_workspace.py b/temba/api/v2/tests/test_workspace.py index 68cffb00c74..a997e892d63 100644 --- a/temba/api/v2/tests/test_workspace.py +++ b/temba/api/v2/tests/test_workspace.py @@ -14,7 +14,7 @@ def test_endpoint(self): # no filtering options.. just gets the current org self.assertGet( endpoint_url, - [self.agent, self.user, self.editor, self.admin], + [self.agent, self.editor, self.admin], raw={ "uuid": str(self.org.uuid), "name": "Nyaruka",