Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

test_invite: Clarify by filters that no *new* ScheduledEmails are made.

Alex Vandiver9e972bc82cee
diff --git a/zerver/tests/test_invite.py b/zerver/tests/test_invite.py
index dab0e3ff6d5..5bc33dc4d3f 100644
--- a/zerver/tests/test_invite.py
+++ b/zerver/tests/test_invite.py
@@ -1091,12 +1091,18 @@ so we didn't send them an invitation. We did send invitations to everyone else!"
# Check invitation reminder email is scheduled with 4 day link expiry
self.invite("[email protected]", ["Denmark"], invite_expires_in_minutes=4 * 24 * 60)
self.assertEqual(
- ScheduledEmail.objects.filter(type=ScheduledEmail.INVITATION_REMINDER).count(), 1
+ ScheduledEmail.objects.filter(
+ address="[email protected]", type=ScheduledEmail.INVITATION_REMINDER
+ ).count(),
+ 1,
)
# Check invitation reminder email is not scheduled with 3 day link expiry
self.invite("[email protected]", ["Denmark"], invite_expires_in_minutes=3 * 24 * 60)
self.assertEqual(
- ScheduledEmail.objects.filter(type=ScheduledEmail.INVITATION_REMINDER).count(), 1
+ ScheduledEmail.objects.filter(
+ address="[email protected]", type=ScheduledEmail.INVITATION_REMINDER
+ ).count(),
+ 0,
)
# make sure users can't take a valid confirmation key from another