Changeset 6232 for main/waeup.sirp/trunk
- Timestamp:
- 30 May 2011, 00:20:17 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_certificatecontainer.py
r6230 r6232 32 32 from zope.interface.verify import verifyClass, verifyObject 33 33 from waeup.sirp.app import University 34 from waeup.sirp.interfaces import DuplicationError 34 35 from waeup.sirp.testing import FunctionalLayer, WAeUPSIRPUnitTestLayer 35 36 from waeup.sirp.university.certificate import Certificate … … 93 94 container.addCertificate(cert1) 94 95 self.assertRaises( 95 ValueError,96 DuplicationError, 96 97 container.addCertificate, cert2) 97 98 … … 104 105 self.app['certs']['SomeKey'] = cert1 105 106 self.assertRaises( 106 ValueError,107 DuplicationError, 107 108 container.__setitem__, 'OtherKey', cert2) 108 109 assert len(container) == 1 110 111 def test_clear(self): 112 container = CertificateContainer() 113 self.app['certs'] = container # enable catalogs 114 cert1 = Certificate(code="CERT1") 115 cert2 = Certificate(code="CERT2") 116 container['CERT1'] = cert1 117 container['CERT2'] = cert2 118 container.clear() 119 assert len(container) == 0 109 120 110 121
Note: See TracChangeset for help on using the changeset viewer.