Skip to content

Commit

Permalink
Update factories and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jmr committed Jun 30, 2021
1 parent 0fda450 commit 54be61d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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"
2 changes: 1 addition & 1 deletion tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 54be61d

Please sign in to comment.