From d550a39d260e759679235340dd6cf2a48c917049 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Thu, 30 Apr 2015 13:20:59 -0700 Subject: [PATCH] Correct test to handle py3 --- tests/contrib/django/tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/contrib/django/tests.py b/tests/contrib/django/tests.py index ddf8a1ab..f1bb932f 100644 --- a/tests/contrib/django/tests.py +++ b/tests/contrib/django/tests.py @@ -707,7 +707,9 @@ class PromiseSerializerTestCase(TestCase): def test_real_gettext_lazy(self): d = {'lazy_translation': gettext_lazy('testing')} - assert transform(d) == {"u'lazy_translation'": "u'testing'"} + key = "'lazy_translation'" if six.PY3 else "u'lazy_translation'" + value = "'testing'" if six.PY3 else "u'testing'" + assert transform(d) == {key: value} class ModelInstanceSerializerTestCase(TestCase):