Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit d550a39

Browse files
committed
Correct test to handle py3
1 parent c04b4c4 commit d550a39

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/contrib/django/tests.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,9 @@ def fake_gettext(to_translate):
707707

708708
def test_real_gettext_lazy(self):
709709
d = {'lazy_translation': gettext_lazy('testing')}
710-
assert transform(d) == {"u'lazy_translation'": "u'testing'"}
710+
key = "'lazy_translation'" if six.PY3 else "u'lazy_translation'"
711+
value = "'testing'" if six.PY3 else "u'testing'"
712+
assert transform(d) == {key: value}
711713

712714

713715
class ModelInstanceSerializerTestCase(TestCase):

0 commit comments

Comments
 (0)