示例#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'])