[Zope3-checkins] CVS: Zope3/src/zope/app/i18n/browser/tests - test_translate.py:1.2

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Mar 9 07:39:36 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/i18n/browser/tests
In directory cvs.zope.org:/tmp/cvs-serv9939/src/zope/app/i18n/browser/tests

Modified Files:
	test_translate.py 
Log Message:


Adjusted code to use utility service to look up factories or use the new zapi
methods.




=== Zope3/src/zope/app/i18n/browser/tests/test_translate.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/i18n/browser/tests/test_translate.py:1.1	Mon Mar  8 18:34:18 2004
+++ Zope3/src/zope/app/i18n/browser/tests/test_translate.py	Tue Mar  9 07:39:05 2004
@@ -19,7 +19,8 @@
 
 from zope.app.tests.placelesssetup import PlacelessSetup
 from zope.app.tests import ztapi
-from zope.component.factory import provideFactory
+from zope.component.interfaces import IFactory
+from zope.component.factory import Factory
 
 from zope.app.i18n.browser.translate import Translate
 from zope.app.i18n.translationdomain import TranslationDomain
@@ -46,7 +47,9 @@
         # Setup the registries
         ztapi.provideAdapter(IHTTPRequest, IUserPreferredCharsets,
                              HTTPCharsets)
-        provideFactory('Message Catalog', MessageCatalog)
+
+        ztapi.provideUtility(IFactory, Factory(MessageCatalog),
+                             'Message Catalog')
 
         domain = TranslationDomain()
         domain.domain = 'default'




More information about the Zope3-Checkins mailing list