[Zope3-checkins] CVS: Zope3/src/zope/app/schema/tests -
test_interfaceutility.py:1.8
Stephan Richter
srichter at cosmos.phy.tufts.edu
Sat Apr 17 10:34:05 EDT 2004
Update of /cvs-repository/Zope3/src/zope/app/schema/tests
In directory cvs.zope.org:/tmp/cvs-serv16896/src/zope/app/schema/tests
Modified Files:
test_interfaceutility.py
Log Message:
Get rid of getRegisteredMatching().
=== Zope3/src/zope/app/schema/tests/test_interfaceutility.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/schema/tests/test_interfaceutility.py:1.7 Sun Apr 11 14:16:29 2004
+++ Zope3/src/zope/app/schema/tests/test_interfaceutility.py Sat Apr 17 10:33:34 2004
@@ -269,26 +269,6 @@
self.assertEqual(utilities.getUtility(IInterface, name=name).foo(),
gout)
- def test_getRegisteredMatching(self):
- self.test_local_utilities()
- utilities = getService(self.rootFolder, Utilities)
- r = list(utilities.getRegisteredMatching())
- r.sort()
- path = "/++etc++site/default/foo"
- cr1 = utilities.queryRegistrationsFor(
- utility.UtilityRegistration("", IInterface, path))
- cr2 = utilities.queryRegistrationsFor(
- utility.UtilityRegistration("bob", IInterface, path))
- self.assertEqual(r, [(IInterface, "", cr1), (IInterface, "bob", cr2)])
- self.assertEqual(r[0][2].__parent__, utilities)
- self.assertEqual(r[1][2].__parent__, utilities)
- # Now tescvt that an empty registry doesn't show up
- for cd in cr1.info(): # Remove everything from cr1
- cd['registration'].status = UnregisteredStatus
- self.assertEqual(bool(cr1), False)
- r = list(utilities.getRegisteredMatching())
- self.assertEqual(r, [(IInterface, "bob", cr2)])
-
def test_suite():
return unittest.makeSuite(TestInterfaceUtility)
More information about the Zope3-Checkins
mailing list