tests/email_validate.py
branchdevel
changeset 193 e5ec4bfa4929
parent 182 e6af45edff5a
--- a/tests/email_validate.py	Mon Feb 27 22:20:19 2012 +0100
+++ b/tests/email_validate.py	Mon Feb 27 22:21:22 2012 +0100
@@ -1,7 +1,7 @@
 import unittest
 
 from iro.validate import vEmail
-from iro.error import InvalidMail
+from iro.error import InvalidMail, ValidateException
 
 
 class testEmail(unittest.TestCase):
@@ -57,3 +57,9 @@
 
     def testString(self):
         self.assertEqual(vEmail('x@test.de', None),"x@test.de")
+
+    def testAllowString(self):
+        self.assertRaises(ValidateException,vEmail, 'x@test.de', None, allowString=False)
+
+    def testAllowList(self):
+        self.assertRaises(ValidateException,vEmail, ['x@test.de'], None, allowList=False)