示例#1
0
 def test_should_validate_values_within_short_code_regex(self):
     constraint = ShortCodeRegexConstraint("^[a-zA-Z0-9]+$")
     with self.assertRaises(ShortCodeRegexMismatchException):
         constraint.validate('shortCode#')
示例#2
0
 def test_should_return_lower_case_value_if_short_code_is_upper_case(self):
     constraint = ShortCodeRegexConstraint("^[a-zA-Z0-9]+$")
     self.assertEquals('shortcode', constraint.validate('SHORTCODE'))
示例#3
0
 def test_should_validate_values_within_short_code_regex(self):
     constraint = ShortCodeRegexConstraint("^[a-zA-Z0-9]+$")
     self.assertEquals('shortCode', constraint.validate('shortCode1'))