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

Sidnei da Silva sidnei at x3ng.com.br
Wed Aug 13 10:37:19 EDT 2003


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

Modified Files:
      Tag: dreamcatcher-ttwschema-branch
	test_interfaceutility.py 
Log Message:
__name__-geddon. Use getName for getting the name of interfaces

=== Zope3/src/zope/app/utilities/tests/test_interfaceutility.py 1.3.2.1 => 1.3.2.2 ===
--- Zope3/src/zope/app/utilities/tests/test_interfaceutility.py:1.3.2.1	Tue Aug 12 09:19:30 2003
+++ Zope3/src/zope/app/utilities/tests/test_interfaceutility.py	Wed Aug 13 09:36:43 2003
@@ -102,7 +102,8 @@
                          utility.LocalUtilityService())
 
     def test_getLocalInterface_delegates_to_globalUtility(self):
-        globalUtilityService.provideUtility(IInterface, Bar("global"))
+        globalUtilityService.provideUtility(IInterface, Bar("blob"),
+                                            name="blob")
         globalUtilityService.provideUtility(IBaz, Baz("global baz"))
         globalUtilityService.provideUtility(IInterface, Foo("global bob"),
                                             name="bob")
@@ -110,7 +111,7 @@
         iface_service = getService(self.rootFolder, Interfaces)
         self.assert_(iface_service != globalInterfaceService)
         self.assertEqual(iface_service.getInterface("bob").__class__, Foo)
-        self.assertEqual(iface_service.getInterface('').__class__, Bar)
+        self.assertEqual(iface_service.getInterface("blob").__class__, Bar)
 
     def test_localInterfaceitems_filters_accordingly(self):
         bar = Bar("global")
@@ -134,8 +135,9 @@
         for pair in [('bob', foo), ('', bar)]:
             self.assert_(pair in ifaces)
 
-        self.assertEqual(iface_service.items(base=Interface),
-                         [])
+        ifaces = iface_service.items(base=Interface)
+        for pair in [('bob', foo), ('', bar)]:
+            self.assert_(pair in ifaces)
 
     def test_localInterfaceitems_filters_only_interfaces(self):
         bar = Bar("global")




More information about the Zope3-Checkins mailing list