Correct test to handle py3

This commit is contained in:
David Cramer 2015-04-30 13:20:59 -07:00
parent c04b4c4df3
commit d550a39d26
1 changed files with 3 additions and 1 deletions

View File

@ -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):