From e056b8062fb9d5f46c465c5fb466dd936cdb84e2 Mon Sep 17 00:00:00 2001 From: Todd Dembrey <todd.dembrey@torchbox.com> Date: Wed, 6 Nov 2019 11:59:57 +0000 Subject: [PATCH] fixup! Add basic management command to trigger reminders about reports --- opentech/apply/projects/tests/test_commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opentech/apply/projects/tests/test_commands.py b/opentech/apply/projects/tests/test_commands.py index 5897e1c1b..6d907ab46 100644 --- a/opentech/apply/projects/tests/test_commands.py +++ b/opentech/apply/projects/tests/test_commands.py @@ -15,14 +15,15 @@ from .factories import ( ) -@override_settings(ALLOWED_HOSTS=[ApplyHomePage.objects.first().get_site().hostname]) @override_settings(ROOT_URLCONF='opentech.apply.urls') class TestNotifyReportDue(TestCase): def test_notify_report_due_in_7_days(self): in_a_week = timezone.now() + relativedelta(days=7) ReportConfigFactory(schedule_start=in_a_week, project__in_progress=True) out = StringIO() - call_command('notify_report_due', 7, stdout=out) + + with self.settings(ALLOWED_HOSTS=[ApplyHomePage.objects.first().get_site().hostname]): + call_command('notify_report_due', 7, stdout=out) self.assertIn('Notified project', out.getvalue()) def test_dont_notify_report_due_in_7_days_already_submitted(self): -- GitLab