Browse Source

Extra tests.

Rafał Pitoń 11 years ago
parent
commit
534ff688b1
1 changed files with 10 additions and 0 deletions
  1. 10 0
      misago/core/tests/test_migrationutils.py

+ 10 - 0
misago/core/tests/test_migrationutils.py

@@ -18,6 +18,16 @@ class LazyTranslationStringTests(TestCase):
         self.assertEqual(unicode(string), 'Inhaltstyp')
 
 
+class OriginalMessageTests(TestCase):
+    def test_original_message(self):
+        """original_message returns untranslated message for misago messages"""
+        string = migrationutils.ugettext_lazy('content type')
+
+        self.assertEqual(migrationutils.original_message(string),
+                         string.message)
+        self.assertEqual("Lorem ipsum", "Lorem ipsum")
+
+
 class CacheBusterUtilsTests(TestCase):
     def setUp(self):
         self.orm = {