          s = TestSerializer(data={'address': 'not an ip address'})
          self.assertFalse(s.is_valid())
          self.assertEqual(1, len(s.errors['address']),
                           'Unexpected number of validation errors: '
                           '{0}'.format(s.errors))
  
  
  @pytest.mark.skipif('not postgres_fields')
  class TestPosgresFieldsMapping(TestCase):
      def test_hstore_field(self):
 
</s> remove class BaseTokenAuthTests(object):
 </s> add class BaseTokenAuthTests: </s> remove class Field(object):
 </s> add class Field: </s> remove         class AuthRaisesAttributeError(object):
 </s> add         class AuthRaisesAttributeError: </s> remove         if isinstance(ret, six.text_type):
 </s> add         if isinstance(ret, str): </s> remove @python_2_unicode_compatible
class PKOnlyObject(object):
 </s> add class PKOnlyObject:
                         '{}'.format(s.errors))
          s = TestSerializer(data={'address': 'not an ip address'})
          self.assertFalse(s.is_valid())
          self.assertEqual(1, len(s.errors['address']),
                           'Unexpected number of validation errors: '
                         '{}'.format(s.errors))
  
  
  @pytest.mark.skipif('not postgres_fields')
  class TestPosgresFieldsMapping(TestCase):
      def test_hstore_field(self):
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