[Zope-CVS] CVS: Packages/pypes/pypes/tests - test_identity.py:1.16
Casey Duncan
casey at zope.com
Tue May 25 22:26:20 EDT 2004
Update of /cvs-repository/Packages/pypes/pypes/tests
In directory cvs.zope.org:/tmp/cvs-serv16904/tests
Modified Files:
test_identity.py
Log Message:
Use insert() method to add items to the identity service
Make sure unregisterable objects do not linger in the identity service
=== Packages/pypes/pypes/tests/test_identity.py 1.15 => 1.16 ===
--- Packages/pypes/pypes/tests/test_identity.py:1.15 Mon Apr 12 22:24:33 2004
+++ Packages/pypes/pypes/tests/test_identity.py Tue May 25 22:26:18 2004
@@ -56,9 +56,12 @@
self.assertEqual(len(ids), 1000)
def testRegisterFailure(self):
- from pypes.exceptions import IdentityError
+ from pypes.exceptions import IdentityError, IdentityKeyError
self.assertRaises(
IdentityError, self.identity.register, None)
+ # Whitebox test: Make sure object is not stored in identity mapping
+ self.assertRaises(
+ IdentityKeyError, self.identity.getObject, self.identity._v_nextid)
def testDuplicateRegistrationFails(self):
from pypes.exceptions import IdentityError
More information about the Zope-CVS
mailing list