              ChildSerializer():
                  char_field = CharField(max_length=100)
                  non_model_field = CharField()
          """)
          self.assertEqual(unicode_repr(ChildSerializer()), child_expected)
          self.assertEqual(unicode_repr(TestSerializer()), test_expected)
          self.assertEqual(unicode_repr(ChildSerializer()), child_expected)
  
  
  class OneToOneTargetTestModel(models.Model):
      text = models.CharField(max_length=100)
  
 
</s> remove         self.assertEqual(unicode_repr(TestChildModelSerializer()), child_expected)
 </s> add         self.assertEqual(repr(TestChildModelSerializer()), child_expected) </s> remove         self.assertEqual(unicode_repr(TestSerializer()), expected)
 </s> add         self.assertEqual(repr(TestSerializer()), expected) </s> remove         self.assertEqual(unicode_repr(TestSerializer()), expected)
 </s> add         self.assertEqual(repr(TestSerializer()), expected) </s> remove         self.assertEqual(unicode_repr(TestSerializer()), expected)
 </s> add         self.assertEqual(repr(TestSerializer()), expected) </s> remove         self.assertEqual(unicode_repr(TestSerializer()), expected)
 </s> add         self.assertEqual(repr(TestSerializer()), expected)
        self.assertEqual(repr(ChildSerializer()), child_expected)
        self.assertEqual(repr(TestSerializer()), test_expected)
        self.assertEqual(repr(ChildSerializer()), child_expected)
              ChildSerializer():
                  char_field = CharField(max_length=100)
                  non_model_field = CharField()
          """)
        self.assertEqual(repr(ChildSerializer()), child_expected)
        self.assertEqual(repr(TestSerializer()), test_expected)
        self.assertEqual(repr(ChildSerializer()), child_expected)
        self.assertEqual(repr(ChildSerializer()), child_expected)
        self.assertEqual(repr(TestSerializer()), test_expected)
        self.assertEqual(repr(ChildSerializer()), child_expected)
        self.assertEqual(repr(ChildSerializer()), child_expected)
        self.assertEqual(repr(TestSerializer()), test_expected)
        self.assertEqual(repr(ChildSerializer()), child_expected)
  
  
  class OneToOneTargetTestModel(models.Model):
      text = models.CharField(max_length=100)
  
keep keep keep keep replace replace replace keep keep keep keep keep
 Dropped Python 2 compatibility. (#6615)

Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com> 
tests/test_model_serializer.py