[Zope3-checkins] CVS: Zope3/src/zope/app/contentdirective/tests - test_directives.py:1.5 test_factory.py:1.4

R. Sean Bowman sean.bowman@acm.org
Thu, 6 Feb 2003 01:50:36 -0500


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

Modified Files:
	test_directives.py test_factory.py 
Log Message:
finished changing service names to use strings defined in
zope/component/servicenames.py, changed the name of
ErrorReportingService to ErrorReports and Resources to ResourceService


=== Zope3/src/zope/app/contentdirective/tests/test_directives.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/contentdirective/tests/test_directives.py:1.4	Fri Jan 10 09:06:28 2003
+++ Zope3/src/zope/app/contentdirective/tests/test_directives.py	Thu Feb  6 01:49:33 2003
@@ -31,6 +31,7 @@
 import zope.app.contentdirective
 from zope.app.security.exceptions import UndefinedPermissionError
 from zope.component import getService
+from zope.component.servicenames import Factories
 
 # explicitly import ExampleClass and IExample using full paths
 # so that they are the same objects as resolve will get.
@@ -159,7 +160,7 @@
 </content>
             """)
         xmlconfig(f)
-        factory = getService(None, 'Factories').getFactory('Example')
+        factory = getService(None, Factories).getFactory('Example')
         self.failUnless(type(factory) is Proxy)
 
 


=== Zope3/src/zope/app/contentdirective/tests/test_factory.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/contentdirective/tests/test_factory.py:1.3	Mon Dec 30 22:35:07 2002
+++ Zope3/src/zope/app/contentdirective/tests/test_factory.py	Thu Feb  6 01:49:33 2003
@@ -20,6 +20,7 @@
 
 from zope.configuration.xmlconfig import xmlconfig, ZopeXMLConfigurationError
 from zope.configuration.xmlconfig import XMLConfig
+from zope.component.servicenames import Factories
 from zope.app.tests.placelesssetup import PlacelessSetup
 from zope.security.management import newSecurityManager, system_user
 
@@ -62,7 +63,7 @@
 </content>
                        """)
         xmlconfig(f)
-        obj = getService(None, "Factories").createObject('Example')
+        obj = getService(None, Factories).createObject('Example')
         obj = removeAllProxies(obj)
         self.failUnless(isinstance(obj, ExampleClass))
 
@@ -80,7 +81,7 @@
 </content>
                        """)
         xmlconfig(f)
-        obj = getService(None, "Factories").createObject(
+        obj = getService(None, Factories).createObject(
             'zope.app.contentdirective.tests.exampleclass.ExampleClass')
         obj = removeAllProxies(obj)
         self.failUnless(isinstance(obj, ExampleClass))