diff --git a/tests/test_model_serializer.py b/tests/test_model_serializer.py index 048a12fba..8ff97b766 100644 --- a/tests/test_model_serializer.py +++ b/tests/test_model_serializer.py @@ -419,6 +419,13 @@ class TestRelationalFieldMappings(TestCase): class Meta: validators = [] """) + if six.PY2: + # This case is also too awkward to resolve fully across both py2 + # and py3. (See above) + expected = expected.replace( + "('foreign_key', 'one_to_one')", + "(u'foreign_key', u'one_to_one')" + ) self.assertEqual(unicode_repr(TestSerializer()), expected) def test_pk_reverse_foreign_key(self):