[Zope3-checkins] CVS: Zope3/src/zope/app/utilities/tests - test_interfaceutility.py:1.4.6.1

Jim Fulton jim at zope.com
Mon Sep 8 15:22:24 EDT 2003


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

Modified Files:
      Tag: parentgeddon-branch
	test_interfaceutility.py 
Log Message:
Checking in work in progress on parentgeddon-branch so Fred can help
me to get the tests passing.  Specific log entries will be provided
when we merge this into the head.


=== Zope3/src/zope/app/utilities/tests/test_interfaceutility.py 1.4 => 1.4.6.1 ===
--- Zope3/src/zope/app/utilities/tests/test_interfaceutility.py:1.4	Fri Aug 15 20:44:27 2003
+++ Zope3/src/zope/app/utilities/tests/test_interfaceutility.py	Mon Sep  8 14:21:52 2003
@@ -38,7 +38,6 @@
 from zope.app.interfaces.services.utility import ILocalUtility
 from zope.app.interfaces.services.registration import IRegistered
 from zope.app.interfaces.dependable import IDependable
-from zope.context import getWrapperContainer
 from zope.app.tests import setup
 from zope.interface.interface import InterfaceClass
 from zope.interface.interfaces import IInterface
@@ -257,7 +256,8 @@
 
             gout = name and "foo global "+name or "foo global"
 
-            self.assertEqual(utilities.getUtility(IInterface, name=name).foo(), gout)
+            self.assertEqual(utilities.getUtility(IInterface, name=name).foo(),
+                             gout)
 
             registration.status = ActiveStatus
 
@@ -266,7 +266,8 @@
 
             registration.status = RegisteredStatus
 
-            self.assertEqual(utilities.getUtility(IInterface, name=name).foo(), gout)
+            self.assertEqual(utilities.getUtility(IInterface, name=name).foo(),
+                             gout)
 
     def test_getRegisteredMatching(self):
         self.test_local_utilities()
@@ -279,8 +280,8 @@
         cr2 = utilities.queryRegistrationsFor(
             utility.UtilityRegistration("bob", IInterface, path))
         self.assertEqual(r, [(IInterface, "", cr1), (IInterface, "bob", cr2)])
-        self.assertEqual(getWrapperContainer(r[0][2]), utilities)
-        self.assertEqual(getWrapperContainer(r[1][2]), utilities)
+        self.assertEqual(r[0][2].__parent__, utilities)
+        self.assertEqual(r[1][2].__parent__, utilities)
         # Now test that an empty registry doesn't show up
         for cd in cr1.info(): # Remove everything from cr1
             cd['registration'].status = UnregisteredStatus




More information about the Zope3-Checkins mailing list