'Test the to_python and to_database are correctly called on UDTs
@since 3.10
@jira_ticket PYTHON-743
@expected_result the int value is correctly converted to utils.Time
and written to C*
@test_category object_mapper'

def test_udt_to_python(self):

    item = ModelWithDefault(id=1)
    item.save()
    user_to_update = UDT()
    user_to_update.time_col = 10
    item.update(udt=user_to_update)
    (udt, udt_default) = (UDT(time_col=10), UDT(age=1, mf={2: 2}))
    self.assertEqual(ModelWithDefault.objects.get(id=1)._as_dict(), {'id': 1, 'dummy': 42, 'mf': {}, 'udt': udt, 'udt_default': udt_default})
