          serializer = self.Serializer(data=data)
          assert not serializer.is_valid()
          assert serializer.errors == {'non_field_errors': ['No data provided']}
  
      @unittest.skipUnless(ChainMap, 'requires python 3.3')
      def test_serialize_chainmap(self):
          data = ChainMap({'char': 'abc'}, {'integer': 123})
          serializer = self.Serializer(data=data)
          assert serializer.is_valid()
          assert serializer.validated_data == {'char': 'abc', 'integer': 123}
 
</s> remove         assert serializer.errors == {'target': ['Incorrect type. Expected pk value, received %s.' % six.text_type.__name__]}
 </s> add         assert serializer.errors == {'target': ['Incorrect type. Expected pk value, received str.']} </s> remove         text_type_string = six.text_type.__name__
        message = 'Invalid data. Expected a dictionary, but got %s.' % text_type_string
 </s> add         message = 'Invalid data. Expected a dictionary, but got str.' </s> remove                 'Invalid data. Expected a dictionary, but got %s.' % six.text_type.__name__
 </s> add                 'Invalid data. Expected a dictionary, but got str.', </s> remove                 kwargs = super(NestedPointSerializer, self).to_internal_value(data)
 </s> add                 kwargs = super().to_internal_value(data) </s> remove         assert serializer['amount'].value is 123
 </s> add         assert serializer['amount'].value == 123
          serializer = self.Serializer(data=data)
          assert not serializer.is_valid()
          assert serializer.errors == {'non_field_errors': ['No data provided']}
  

      def test_serialize_chainmap(self):
          data = ChainMap({'char': 'abc'}, {'integer': 123})
          serializer = self.Serializer(data=data)
          assert serializer.is_valid()
          assert serializer.validated_data == {'char': 'abc', 'integer': 123}
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_serializer.py