Skip to content

Commit

Permalink
fix(alerts): Fixed MLY alerts test can't be sent after the 28th
Browse files Browse the repository at this point in the history
  • Loading branch information
albertisfu committed Jul 29, 2024
1 parent b56f235 commit d102664
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cl/alerts/tests/tests_recap_alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,9 @@ def test_schedule_wly_and_mly_recap_alerts(self) -> None:
self.assertIn(self.rd.description, txt_email)

# Send scheduled Monthly alerts and check assertions.
call_command("cl_send_scheduled_alerts", rate=Alert.MONTHLY)
current_date = now().replace(day=28, hour=0)
with time_machine.travel(current_date, tick=False):
call_command("cl_send_scheduled_alerts", rate=Alert.MONTHLY)
self.assertEqual(
len(mail.outbox), 2, msg="Outgoing emails don't match."
)
Expand Down

0 comments on commit d102664

Please sign in to comment.