Пример #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'))