示例#1
0
 def test_validate_string_unicode(self):
     """
     Unicode strings pass.
     """
     self.assertTrue(validate_string(u'hello'))
示例#2
0
 def test_validate_string_wrong_type(self):
     """
     It fails if the value is not a string.
     """
     self.assertFalse(validate_string(1))
示例#3
0
 def test_validate_string_str(self):
     """
     Regular Python strings pass.
     """
     self.assertTrue(validate_string('hello'))