From 46b548f978471de1151185e3fd92612b6398f220 Mon Sep 17 00:00:00 2001 From: Ihor Palii Date: Fri, 9 Aug 2024 12:59:14 +0300 Subject: [PATCH] Refactored unittest to check duplicated schedule validation. --- temba/triggers/tests.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/temba/triggers/tests.py b/temba/triggers/tests.py index e4bbce8bb5e..36fabdfa293 100644 --- a/temba/triggers/tests.py +++ b/temba/triggers/tests.py @@ -750,7 +750,7 @@ def test_create_schedule(self): self.assertEqual({group2}, set(trigger.exclude_groups.all())) self.assertEqual({contact1}, set(trigger.contacts.all())) - # there is no conflict detection for scheduled triggers so can create the same trigger again + # there is conflict detection for scheduled triggers so can not create the same trigger again self.assertCreateSubmit( create_url, { @@ -762,8 +762,7 @@ def test_create_schedule(self): "contacts": omnibox_serialize(self.org, [], [contact1], json_encode=True), "exclude_groups": [group2.id], }, - new_obj_query=Trigger.objects.filter(trigger_type="S", flow=flow1).exclude(id=trigger.id), - success_status=200, + form_errors={"__all__": "There already exists a trigger of this type with these options."}, ) def test_create_inbound_call(self):