示例#1
0
 def test_email_raises_ValueError(self):
     for e in ["", None, ["*****@*****.**"], 123]:
         with self.assertRaises(ValueError):
             validatorfuncs.email(e)
示例#2
0
 def validate(self, value, **kwargs):
     return validatorfuncs.email(value, option_key=self.key, **kwargs)
示例#3
0
 def test_email_ok(self):
     for e in ["*****@*****.**", "*****@*****.**"]:
         self.assertEqual(e, validatorfuncs.email(e))
示例#4
0
 def test_email_ok(self):
     for e in ['*****@*****.**', '*****@*****.**']:
         self.assertEqual(e, validatorfuncs.email(e))