              TestSerializer():
                  id = IntegerField(label='ID', read_only=True)
                  duration_field = DurationField(max_value=datetime.timedelta(days=3), min_value=datetime.timedelta(days=1))
          """)
          self.assertEqual(unicode_repr(TestSerializer()), expected)
  
  
  class TestGenericIPAddressFieldValidation(TestCase):
      def test_ip_address_validation(self):
          class IPAddressFieldModel(models.Model):
 
</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) </s> remove         self.assertEqual(unicode_repr(TestSerializer()), expected)
 </s> add         self.assertEqual(repr(TestSerializer()), expected)
        self.assertEqual(repr(TestSerializer()), expected)
              TestSerializer():
                  id = IntegerField(label='ID', read_only=True)
                  duration_field = DurationField(max_value=datetime.timedelta(days=3), min_value=datetime.timedelta(days=1))
          """)
        self.assertEqual(repr(TestSerializer()), expected)
  
  
  class TestGenericIPAddressFieldValidation(TestCase):
      def test_ip_address_validation(self):
          class IPAddressFieldModel(models.Model):
keep keep keep keep 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