[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests - iregistry.py:1.3

Jim Fulton cvs-admin at zope.org
Fri Nov 21 12:09:44 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/services/tests
In directory cvs.zope.org:/tmp/cvs-serv29800/src/zope/app/services/tests

Modified Files:
	iregistry.py 
Log Message:
Changed to use zope.app.location.inside to check containment
requirements. This is necessary to allow more flexible containment
relationships.


=== Zope3/src/zope/app/services/tests/iregistry.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/services/tests/iregistry.py:1.2	Sun Sep 21 13:31:13 2003
+++ Zope3/src/zope/app/services/tests/iregistry.py	Fri Nov 21 12:09:43 2003
@@ -19,6 +19,7 @@
 """
 from zope.app.interfaces.services.registration import IRegistry
 from zope.interface.verify import verifyObject
+from zope.app.location import inside
 
 class TestingIRegistry:
     """Base class for testing implementors of IRegistry
@@ -43,8 +44,7 @@
         have some context.
 
         """
-        self.assertEqual(ob.__parent__, parent)
-        self.failIf(ob.__parent__.__parent__ is None)
+        self.assert_(inside(ob, parent))
 
     def test_implements_IRegistry(self):
         verifyObject(IRegistry, self.createTestingRegistry())
@@ -63,13 +63,13 @@
         registration = self.createTestingRegistration()
         stack = registry.createRegistrationsFor(registration)
 
-        self.assertEqual(stack.__parent__, registry)
+        self.assert_(inside(stack, registry))
 
         # If we call it again, we should get the same object
         self.assertEqual(registry.createRegistrationsFor(registration),
                          stack)
 
-        self._assertInContext(stack, registry)
+        self.assert_(inside(stack, registry))
 
         return stack
 




More information about the Zope3-Checkins mailing list