[Zope3-checkins] CVS: Zope3/src/zope/app/services/translation/tests - test_filters.py:1.4

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Mar 2 12:50:10 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/services/translation/tests
In directory cvs.zope.org:/tmp/cvs-serv28374/src/zope/app/services/translation/tests

Modified Files:
	test_filters.py 
Log Message:


Completed making the language negotiator a utility.



For tests, register a new utility, not a service.


=== Zope3/src/zope/app/services/translation/tests/test_filters.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/services/translation/tests/test_filters.py:1.3	Thu Nov 27 08:59:26 2003
+++ Zope3/src/zope/app/services/translation/tests/test_filters.py	Tue Mar  2 12:49:39 2004
@@ -22,6 +22,7 @@
 
 from zope.app.services.servicenames import Factories
 
+from zope.app.tests import ztapi
 from zope.app.tests.placelesssetup import PlacelessSetup
 from zope.app.component.metaconfigure import \
      provideService, managerHandler, handler
@@ -70,9 +71,10 @@
 
     def setUp(self):
         super(TestGettextExportImport, self).setUp()
-        # Setup the negotiator service registry entry
-        managerHandler('defineService', 'LanguageNegotiation', INegotiator)
-        provideService('LanguageNegotiation', negotiator, 'zope.Public')
+
+        # Setup the negotiator utility
+        ztapi.provideUtility(INegotiator, negotiator)
+
         self._service = TranslationService('default')
         handler(Factories, 'provideFactory', 'Message Catalog',
                 MessageCatalog)




More information about the Zope3-Checkins mailing list