diff --git a/tests/factories.py b/tests/factories.py index 27331bb..2e99e0c 100644 --- a/tests/factories.py +++ b/tests/factories.py @@ -8,6 +8,8 @@ class Meta: model = "osis_notification.EmailNotification" person = factory.SubFactory(PersonFactory) + built_from_module = "osis_notification.contrib.notification" + built_from_class_name = "EmailNotification" class WebNotificationFactory(factory.DjangoModelFactory): @@ -16,3 +18,5 @@ class Meta: person = factory.SubFactory(PersonFactory) payload = factory.fuzzy.FuzzyText() + built_from_module = "osis_notification.contrib.notification" + built_from_class_name = "WebNotification" diff --git a/tests/test_commands.py b/tests/test_commands.py index fb19cc1..cc1a204 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -56,7 +56,7 @@ def test_send_web_notifications(self): self.assertEqual( self.web_notification.state, NotificationStates.PENDING_STATE.name ) - with self.assertNumQueriesLessThan(3): + with self.assertNumQueriesLessThan(4): call_command("send_web_notifications") self.web_notification.refresh_from_db() # now web notification should be in sent state