@@ -356,12 +356,12 @@ def test_months_always_relative(self):
356356 self .assertEqual (next_date , last_report + relativedelta (months = 2 ))
357357
358358 def test_current_due_report_gets_active_report (self ):
359- config = ReportConfigFactory ()
359+ config = ReportConfigFactory (disable_reporting = False )
360360 report = ReportFactory (project = config .project )
361361 self .assertEqual (config .current_due_report (), report )
362362
363363 def test_no_report_creates_report (self ):
364- config = ReportConfigFactory ()
364+ config = ReportConfigFactory (disable_reporting = False )
365365 report = config .current_due_report ()
366366 # Separate day from month for case where start date + 1 month would exceed next month
367367 # length (31st Oct to 30th Nov)
@@ -375,27 +375,31 @@ def test_no_report_creates_report(self):
375375
376376 def test_no_report_creates_report_not_in_past (self ):
377377 config = ReportConfigFactory (
378- schedule_start = self .today - relativedelta (months = 3 )
378+ schedule_start = self .today - relativedelta (months = 3 ), disable_reporting = False
379379 )
380380 report = config .current_due_report ()
381381 self .assertEqual (Report .objects .count (), 1 )
382382 self .assertEqual (report .end_date , self .today )
383383
384384 def test_no_report_creates_report_if_current_skipped (self ):
385- config = ReportConfigFactory ()
385+ config = ReportConfigFactory (disable_reporting = False )
386386 skipped_report = ReportFactory (end_date = self .today + relativedelta (days = 3 ))
387387 report = config .current_due_report ()
388388 self .assertEqual (Report .objects .count (), 2 )
389389 self .assertNotEqual (skipped_report , report )
390390
391391 def test_no_report_schedule_in_future_creates_report (self ):
392- config = ReportConfigFactory (schedule_start = self .today + relativedelta (days = 2 ))
392+ config = ReportConfigFactory (
393+ schedule_start = self .today + relativedelta (days = 2 ), disable_reporting = False
394+ )
393395 report = config .current_due_report ()
394396 self .assertEqual (Report .objects .count (), 1 )
395397 self .assertEqual (report .end_date , self .today + relativedelta (days = 2 ))
396398
397399 def test_past_due_report_creates_report (self ):
398- config = ReportConfigFactory (schedule_start = self .today - relativedelta (days = 2 ))
400+ config = ReportConfigFactory (
401+ schedule_start = self .today - relativedelta (days = 2 ), disable_reporting = False
402+ )
399403 ReportFactory (
400404 project = config .project , end_date = self .today - relativedelta (days = 1 )
401405 )
@@ -411,11 +415,13 @@ def test_past_due_report_creates_report(self):
411415 self .assertEqual (report .end_date , next_due )
412416
413417 def test_today_schedule_gets_report_today (self ):
414- config = ReportConfigFactory (schedule_start = self .today )
418+ config = ReportConfigFactory (disable_reporting = False , schedule_start = self .today )
415419 self .assertEqual (config .current_due_report ().end_date , self .today )
416420
417421 def test_past_due_report_future_schedule_creates_report (self ):
418- config = ReportConfigFactory (schedule_start = self .today + relativedelta (days = 3 ))
422+ config = ReportConfigFactory (
423+ schedule_start = self .today + relativedelta (days = 3 ), disable_reporting = False
424+ )
419425 ReportFactory (
420426 project = config .project , end_date = self .today - relativedelta (days = 1 )
421427 )
0 commit comments