summaryrefslogtreecommitdiff
path: root/src/zope/i18n/tests/test_simpletranslationdomain.py
diff options
context:
space:
mode:
authorChristian Theune <ct@gocept.com>2007-05-03 21:57:54 +0000
committerChristian Theune <ct@gocept.com>2007-05-03 21:57:54 +0000
commit2754b8e3c1c20da00c78e680aeb857674dddcd93 (patch)
treef1a295d1ccc6cf3f1b5906283016ee0ed578f467 /src/zope/i18n/tests/test_simpletranslationdomain.py
parentf9c90db84773e5d4e3860409eda8a317f4e07487 (diff)
parent565b0ef9e74a89a39e85b9171db1b29d3b0a88bf (diff)
downloadzope-i18n-2754b8e3c1c20da00c78e680aeb857674dddcd93.tar.gz
Moving code to satellite.
Diffstat (limited to 'src/zope/i18n/tests/test_simpletranslationdomain.py')
-rw-r--r--src/zope/i18n/tests/test_simpletranslationdomain.py50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/zope/i18n/tests/test_simpletranslationdomain.py b/src/zope/i18n/tests/test_simpletranslationdomain.py
new file mode 100644
index 0000000..0a2897a
--- /dev/null
+++ b/src/zope/i18n/tests/test_simpletranslationdomain.py
@@ -0,0 +1,50 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""This module tests the regular persistent Translation Domain.
+
+$Id$
+"""
+import unittest
+from zope.i18n.simpletranslationdomain import SimpleTranslationDomain
+from zope.i18n.tests.test_itranslationdomain import TestITranslationDomain
+
+
+data = {
+ ('en', 'short_greeting'): 'Hello!',
+ ('de', 'short_greeting'): 'Hallo!',
+ ('en', 'greeting'): 'Hello $name, how are you?',
+ ('de', 'greeting'): 'Hallo $name, wie geht es Dir?'}
+
+
+class TestSimpleTranslationDomain(unittest.TestCase, TestITranslationDomain):
+
+ def setUp(self):
+ TestITranslationDomain.setUp(self)
+
+ def tearDown(self):
+ TestITranslationDomain.tearDown(self)
+
+ def _getTranslationDomain(self):
+ domain = SimpleTranslationDomain('default', data)
+ return domain
+
+
+def test_suite():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(TestSimpleTranslationDomain))
+ return suite
+
+
+if __name__ == '__main__':
+ unittest.TextTestRunner().run(test_suite())