'Test the updates work as expected when an object is deleted
@since 3.9
@jira_ticket PYTHON-657
@expected_result the non updated column is None and the
updated column has the set value
@test_category object_mapper'

def test_only_set_values_is_updated(self):

    ModelWithDefault.create(id=1, mf={1: 1}, dummy=1).save()
    item = ModelWithDefault.filter(id=1).first()
    ModelWithDefault.objects(id=1).delete()
    item.mf = {1: 2}
    (udt, udt_default) = (UDT(age=1, mf={2: 3}), UDT(age=1, mf={2: 3}))
    (item.udt, item.udt_default) = (udt, udt_default)
    item.save()
    self.assertEqual(ModelWithDefault.get()._as_dict(), {'id': 1, 'dummy': None, 'mf': {1: 2}, 'udt': udt, 'udt_default': udt_default})
