From 642f4c3ade30ce9f96a19586a6551293e81412fd Mon Sep 17 00:00:00 2001 From: Thomas Koopman Date: Wed, 18 Dec 2024 13:26:05 +0100 Subject: [PATCH] Edit test --- app/tests/challenges_tests/test_tasks.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/tests/challenges_tests/test_tasks.py b/app/tests/challenges_tests/test_tasks.py index 06f4c169e..51d583dcd 100644 --- a/app/tests/challenges_tests/test_tasks.py +++ b/app/tests/challenges_tests/test_tasks.py @@ -203,6 +203,10 @@ def test_challenge_budget_alert_email(settings): # Next budget alert threshold exceeded assert len(mail.outbox) != 0 + assert ( + mail.outbox[0].subject + == "[testserver] [test] 90% Budget Consumed Alert" + ) @pytest.mark.django_db @@ -214,5 +218,7 @@ def test_challenge_budget_alert_no_budget(): compute_cost_euro_millicents=1, time_limit=60, ) + assert len(mail.outbox) == 0 update_compute_costs_and_storage_size() assert len(mail.outbox) != 0 + assert "Budget Consumed Alert" in mail.outbox[0].subject