Changeset 12260 for main/waeup.ikoba/trunk/src/waeup/ikoba/tests
- Timestamp:
- 19 Dec 2014, 08:11:12 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/tests/test_interfaces.py
r11949 r12260 21 21 import grok 22 22 import unittest 23 from waeup.ikoba.interfaces import DuplicationError, RoleSource, check_email 23 from waeup.ikoba.interfaces import ( 24 DuplicationError, RoleSource, check_email, check_id, check_uuid) 24 25 from waeup.ikoba.testing import FunctionalLayer, FunctionalTestCase 25 26 … … 61 62 self.assertTrue(check_email('bob@foo,alice@bar') is None) 62 63 return 64 65 def test_check_id(self): 66 self.assertTrue(check_id('abcABC') is not None) 67 # No spaces 68 self.assertTrue(check_id('abc ABC') is None) 69 # More than 6 characters are not allowed 70 self.assertTrue(check_id('abcdefg') is None) 71 # Only underscores and hyphens are allowed 72 self.assertTrue(check_id('a+b') is None) 73 self.assertTrue(check_id('a/b') is None) 74 self.assertTrue(check_id('a-b') is not None) 75 self.assertTrue(check_id('a_b') is not None) 76 # 32 charachters are allowed 77 self.assertTrue( 78 check_uuid('dfceb5c587364faf95e17b3cbaf98d5f') is not None) 79 return 80 63 81 64 82 class DuplicationErrorTests(unittest.TestCase):
Note: See TracChangeset for help on using the changeset viewer.