コード例 #1
0
ファイル: test_validators.py プロジェクト: BitPhone/drogulus
 def test_validate_string_unicode(self):
     """
     Unicode strings pass.
     """
     self.assertTrue(validate_string(u'hello'))
コード例 #2
0
ファイル: test_validators.py プロジェクト: BitPhone/drogulus
 def test_validate_string_wrong_type(self):
     """
     It fails if the value is not a string.
     """
     self.assertFalse(validate_string(1))
コード例 #3
0
ファイル: test_validators.py プロジェクト: BitPhone/drogulus
 def test_validate_string_str(self):
     """
     Regular Python strings pass.
     """
     self.assertTrue(validate_string('hello'))