def test_get_serializer_data(self): form = SerializerFormBase() form.cleaned_data = {'hello': 'world'} form.initial = {'stuff': 'here', 'hello': 'mars'} self.assertDictEqual(form.get_serializer_data(), { 'hello': 'world', 'stuff': 'here', })