[Zope3-checkins] CVS: Zope3/src/zope/i18n/tests - test_translator.py:1.2
Jim Fulton
jim@zope.com
Tue, 25 Mar 2003 16:05:43 -0500
Update of /cvs-repository/Zope3/src/zope/i18n/tests
In directory cvs.zope.org:/tmp/cvs-serv32297
Modified Files:
test_translator.py
Log Message:
Changed the test to not set up its own global translation service,
now that one is set up by placelesssetup.
=== Zope3/src/zope/i18n/tests/test_translator.py 1.1 => 1.2 ===
--- Zope3/src/zope/i18n/tests/test_translator.py:1.1 Tue Mar 25 15:21:28 2003
+++ Zope3/src/zope/i18n/tests/test_translator.py Tue Mar 25 16:05:43 2003
@@ -19,7 +19,7 @@
import os
import unittest
-from zope.i18n.globaltranslationservice import GlobalTranslationService
+from zope.i18n.globaltranslationservice import translationService
from zope.i18n.interfaces import IReadTranslationService
from zope.i18n.interfaces import ILocaleIdentity, ILocale
from zope.i18n.translate import Translator
@@ -36,15 +36,11 @@
# Create a global translation service, initialized with a bunch of
# catalogs (stolen from test_globaltranslationservice.py).
path = testdir()
- service = GlobalTranslationService('default')
+ service = translationService
de_catalog = GettextMessageCatalog('de', 'default',
os.path.join(path, 'de-default.mo'))
service.addCatalog(de_catalog)
- # Now register the translation service
- getServiceManager(None).defineService('Translation',
- IReadTranslationService)
- getServiceManager(None).provideService('Translation',
- service)
+
# Create a stub ILocaleIdentity
class LocaleIdentityStub:
# Lie -- we're only going to implement part of the interface