コード例 #1
0
 def test_wrong_amount_at_work_should_cause_form_error(self):
     data = self._get_good_post_data()
     data['amount'] = 500
     t_form = TransitSubsidyForm(data)
     self.assertFalse(t_form.is_valid(), "Should be a bad form for AMOUNT")
     data['amount'] = -1
     t_form = TransitSubsidyForm(data)
     self.assertFalse(t_form.is_valid(), "Should be a bad form for AMOUNT")
コード例 #2
0
 def test_wrong_amount_at_work_should_cause_form_error(self):
     data = self._get_good_post_data()
     data['amount'] = 500
     t_form = TransitSubsidyForm( data  )
     self.assertFalse( t_form.is_valid() , "Should be a bad form for AMOUNT")
     data['amount'] = -1
     t_form = TransitSubsidyForm( data  )
     self.assertFalse( t_form.is_valid() , "Should be a bad form for AMOUNT")    
コード例 #3
0
 def test_wrong_days_at_work_should_cause_form_error(self):
     data = self._get_good_post_data()
     data['number_of_workdays'] = 50
     t_form = TransitSubsidyForm( data  )
     self.assertFalse( t_form.is_valid() , "Should be a bad form for WORK DAYS")
     data['number_of_workdays'] = -1
     t_form = TransitSubsidyForm( data  )
     self.assertFalse( t_form.is_valid() , "Should be a bad form for WORK DAYS")
コード例 #4
0
 def test_wrong_days_at_work_should_cause_form_error(self):
     data = self._get_good_post_data()
     data['number_of_workdays'] = 50
     t_form = TransitSubsidyForm(data)
     self.assertFalse(t_form.is_valid(),
                      "Should be a bad form for WORK DAYS")
     data['number_of_workdays'] = -1
     t_form = TransitSubsidyForm(data)
     self.assertFalse(t_form.is_valid(),
                      "Should be a bad form for WORK DAYS")
コード例 #5
0
 def test_bad_ssn_should_cause_form_error(self):
     data = self._get_good_post_data()
     data['last_four_ssn'] = '*bZ'
     t_form = TransitSubsidyForm(data)
     self.assertFalse(t_form.is_valid(), "Should be a bad form SSN.")
コード例 #6
0
 def test_bad_ssn_should_cause_form_error(self):
     data = self._get_good_post_data()
     data['last_four_ssn'] = '*bZ'
     t_form = TransitSubsidyForm( data  )
     self.assertFalse( t_form.is_valid() , "Should be a bad form SSN.")