[Zope-Checkins] CVS: Zope3/lib/python/Zope/I18n/tests - testIWriteMessageCatalog.py:1.3 testIWriteTranslationService.py:1.6
Florent Guillaume
fg@nuxeo.com
Sun, 6 Oct 2002 14:30:28 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/I18n/tests
In directory cvs.zope.org:/tmp/cvs-serv21040/Zope/I18n/tests
Modified Files:
testIWriteMessageCatalog.py testIWriteTranslationService.py
Log Message:
Modified translation service and message catalog interface to be able to
return None when no translation is available.
=== Zope3/lib/python/Zope/I18n/tests/testIWriteMessageCatalog.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/I18n/tests/testIWriteMessageCatalog.py:1.2 Mon Jul 1 13:45:50 2002
+++ Zope3/lib/python/Zope/I18n/tests/testIWriteMessageCatalog.py Sun Oct 6 14:30:27 2002
@@ -61,11 +61,11 @@
def testDeleteMessage(self):
catalog = self._catalog
- self.assertEqual(catalog.queryMessage('test'), 'test')
+ self.assertEqual(catalog.queryMessage('test'), None)
catalog.setMessage('test', 'Test', 1)
self.assertEqual(catalog.queryMessage('test'), 'Test')
catalog.deleteMessage('test')
- self.assertEqual(catalog.queryMessage('test'), 'test')
+ self.assertEqual(catalog.queryMessage('test'), None)
def testGetMessageIds(self):
=== Zope3/lib/python/Zope/I18n/tests/testIWriteTranslationService.py 1.5 => 1.6 ===
--- Zope3/lib/python/Zope/I18n/tests/testIWriteTranslationService.py:1.5 Tue Jul 16 19:41:19 2002
+++ Zope3/lib/python/Zope/I18n/tests/testIWriteTranslationService.py Sun Oct 6 14:30:27 2002
@@ -122,7 +122,7 @@
'Hallo Ihr da!')
service.deleteMessage('test', 'greeting', 'de')
self.assertEqual(service.translate('test', 'greeting',
- target_language='de'), 'greeting')
+ target_language='de'), None)
def _getMessageIds(self, service, domain, filter="%"):