From: dbs Date: Fri, 4 Dec 2009 19:13:13 +0000 (+0000) Subject: Make tests line up with current reality - lines after IDs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=aaa3c1f009ac1e3da68dfb6480fe67c8b40eabed;p=evergreen%2Ftadl.git Make tests line up with current reality - lines after IDs git-svn-id: svn://svn.open-ils.org/ILS/trunk@15086 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/build/i18n/tests/data/complex.po b/build/i18n/tests/data/complex.po index 3e0c427680..a2943201b3 100644 --- a/build/i18n/tests/data/complex.po +++ b/build/i18n/tests/data/complex.po @@ -11,11 +11,11 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8-bit\n" -#: 240:field.aihu.org_unit.label 257:field.ancihu.org_unit.label +#: field.aihu.org_unit.label:240 field.ancihu.org_unit.label:257 msgid "Using Library" msgstr "Utiliser la bibliothèque" -#: 2475:field.rxbt.voided.label +#: field.rxbt.voided.label:2475 msgid "" "\n" "Super crazy long and repetitive message ID from hell\n" @@ -25,6 +25,6 @@ msgid "" "Super crazy long and repetitive message ID from hell" msgstr "ôèàéç" -#: 524:field.bre.source.label +#: field.bre.source.label:524 msgid "Record Source" msgstr "" diff --git a/build/i18n/tests/testbase.py b/build/i18n/tests/testbase.py index 2320b294d1..d7e83bbb12 100644 --- a/build/i18n/tests/testbase.py +++ b/build/i18n/tests/testbase.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf=8 -*- # vim: set fileencoding=utf-8 : """ Test the BaseL10N class to ensure that we have a solid foundation. @@ -19,14 +20,14 @@ class TestBaseL10N(unittest.TestCase): canonpo = os.path.join(basedir, 'data/complex.po') poentries = [{ 'msgid': 'Using Library', - 'msgstr': 'Utiliser la bibliothèque', + 'msgstr': u'Utiliser la bibliothèque', 'occurrences': [ {'line': 240, 'name': 'field.aihu.org_unit.label'}, {'line': 257, 'name': 'field.ancihu.org_unit.label'}, ]}, { 'msgid': '\nSuper crazy long and repetitive message ID from hell\nSuper crazy long and repetitive message ID from hell\nSuper crazy long and repetitive message ID from hell\nSuper crazy long and repetitive message ID from hell\nSuper crazy long and repetitive message ID from hell', - 'msgstr': 'ôèàéç', + 'msgstr': u'ôèàéç', 'occurrences': [ {'line': 2475, 'name': 'field.rxbt.voided.label'}, ]}, @@ -65,13 +66,13 @@ class TestBaseL10N(unittest.TestCase): for msg in self.poentries: poe = polib.POEntry() for x in msg['occurrences']: - poe.occurrences.append((x['line'], x['name'])) + poe.occurrences.append((x['name'], x['line'])) poe.msgid = msg['msgid'] if msg.has_key('msgstr'): poe.msgstr = msg['msgstr'] pogen.pot.append(poe) - self.assertEqual(str(poload), str(pogen)) + self.assertEqual(unicode(poload), unicode(pogen)) def testsavepot(self): """