From 7328639f81aedec8c48df3e552523b2513a2c5d1 Mon Sep 17 00:00:00 2001 From: James Meakin <12661555+jmsmkn@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:49:28 +0100 Subject: [PATCH] Fix flaky test --- app/tests/challenges_tests/test_tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/tests/challenges_tests/test_tasks.py b/app/tests/challenges_tests/test_tasks.py index 3917e8da3..a696c962e 100644 --- a/app/tests/challenges_tests/test_tasks.py +++ b/app/tests/challenges_tests/test_tasks.py @@ -241,12 +241,12 @@ def test_challenge_budget_alert_two_thresholds_one_email(settings): # Two budget alert thresholds exceeded, alert only sent for last one. assert len(mail.outbox) == 3 - recipients = [r for m in mail.outbox for r in m.to] - assert recipients == [ + recipients = {r for m in mail.outbox for r in m.to} + assert recipients == { challenge.creator.email, challenge_admin.email, staff_user.email, - ] + } assert ( mail.outbox[0].subject == "[testserver] [test] over 90% Budget Consumed Alert"