          serialized fields
          """
          child = ChildModel(name1='parent name', name2='child name')
          serializer = DerivedModelSerializer(child)
          self.assertEqual(set(serializer.data.keys()),
                           {'name1', 'name2', 'id', 'childassociatedmodel'})
 
</s> remove         assert set(serializer.data.keys()) == {'name1', 'name2', 'id'}
 </s> add         assert set(serializer.data) == {'name1', 'name2', 'id'} </s> remove         assert set(serializer.data.keys()) == {'name', 'ref'}
 </s> add         assert set(serializer.data) == {'name', 'ref'} </s> remove         assert 'text' not in serializer.fields.keys()
 </s> add         assert 'text' not in serializer.fields </s> remove         assert list(serializer.validated_data.keys()) == []
 </s> add         assert list(serializer.validated_data) == [] </s> remove         assert list(serializer.validated_data.keys()) == ['message']
 </s> add         assert list(serializer.validated_data) == ['message']
        self.assertEqual(set(serializer.data),
          serialized fields
          """
          child = ChildModel(name1='parent name', name2='child name')
          serializer = DerivedModelSerializer(child)
        self.assertEqual(set(serializer.data),
                           {'name1', 'name2', 'id', 'childassociatedmodel'})
keep keep keep keep replace keep
 Perfer iter(dict) over iter(dict.keys()) (#5736)

Calling dict.keys() is unnecessary. The two are functionally equivalent
on modern Pythons.

Inspired by Lennart Regebro's talk "Prehistoric Patterns in Python" from
PyCon 2017.

https://www.youtube.com/watch?v=V5-JH23Vk0I 
tests/test_one_to_one_with_inheritance.py