diff --git a/tests/i18n/commands/compilation.py b/tests/i18n/commands/compilation.py
index 12bb89e..8b244f5 100644
a
|
b
|
class PercentRenderingTests(MessageCompilationTests):
|
65 | 65 | from django.template import Template, Context |
66 | 66 | call_command('compilemessages', locale=self.LOCALE, stdout=StringIO()) |
67 | 67 | with translation.override(self.LOCALE): |
68 | | t = Template('{% load i18n %}{% trans "Looks like a str fmt spec %% o but shouldn\'t be interpreted as such" %}') |
69 | | rendered = t.render(Context({})) |
70 | | self.assertEqual(rendered, 'IT translation contains %% for the above string') |
71 | | |
72 | | t = Template('{% load i18n %}{% trans "Completed 50%% of all the tasks" %}') |
73 | | rendered = t.render(Context({})) |
74 | | self.assertEqual(rendered, 'IT translation of Completed 50%% of all the tasks') |
| 68 | t1 = Template('{% load i18n %}{% trans "Looks like a str fmt spec % o but shouldn\'t be interpreted as such" %}') |
| 69 | t2 = Template('{% load i18n %}{% blocktrans %}Looks like a str fmt spec % o but shouldn\'t be interpreted as such{% endblocktrans %}') |
| 70 | for templ in (t1, t2): |
| 71 | rendered = templ.render(Context({})) |
| 72 | self.assertEqual(rendered, 'IT translation contains % for the above string') |
| 73 | |
| 74 | t1 = Template('{% load i18n %}{% trans "Completed 50% of all the tasks" %}') |
| 75 | t2 = Template('{% load i18n %}{% blocktrans %}Completed 50% of all the tasks{% endblocktrans %}') |
| 76 | for templ in (t1, t2): |
| 77 | rendered = t.render(Context({})) |
| 78 | self.assertEqual(rendered, 'IT translation of Completed 50% of all the tasks') |
75 | 79 | |
76 | 80 | |
77 | 81 | @override_settings(LOCALE_PATHS=(os.path.join(test_dir, 'locale'),)) |