예제 #1
0
 def test_valids(self):
     """
         Tests that the output of the validate_postcode function has the expected result
     """
     for postcode, expected_result in self.valid_postcodes:
         self.failUnlessEqual(validate_postcode(postcode), expected_result)
예제 #2
0
 def clean(self, value):
     return validate_postcode(value, self.error_messages['invalid_postalcode'])
예제 #3
0
 def test_valids(self):
     """
         Tests that the output of the validate_postcode function has the expected result
     """
     for postcode, expected_result in self.valid_postcodes:
         self.failUnlessEqual(validate_postcode(postcode), expected_result)
예제 #4
0
 def clean(self, value):
     return validate_postcode(value,
                              self.error_messages['invalid_postalcode'])