mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-23 19:11:30 +02:00
Optimise check
This commit is contained in:
parent
c713e3ea16
commit
a3c563e104
@ -511,11 +511,7 @@ class EmailInteractionsTestCase(TestCase):
|
|||||||
)
|
)
|
||||||
# Check that the CC duplicate was still sent a notification email
|
# Check that the CC duplicate was still sent a notification email
|
||||||
email_count = len(mail.outbox)
|
email_count = len(mail.outbox)
|
||||||
found = False
|
found = any(dup_email in email.to for email in mail.outbox[:email_count - 1])
|
||||||
for i in range(0, email_count - 1):
|
|
||||||
if dup_email in mail.outbox[i].to:
|
|
||||||
found = True
|
|
||||||
break
|
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
found, "The duplicated email across user ID's was not sent a notification."
|
found, "The duplicated email across user ID's was not sent a notification."
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user