Example #1
0
 def test_reporting_period_with_more_than_max_hours_failure(self):
     """ Test the timecard form when the reporting period requires no more
     than 60 hours to be reported and the hours entered are more than 60"""
     form_data = self.form_data()
     form_data['timecardobjects-0-hours_spent'] = '50'
     form_data['timecardobjects-1-hours_spent'] = '20'
     formset = TimecardFormSet(form_data)
     formset.set_max_working_hours(60)
     self.assertFalse(formset.is_valid())