'Test update of column value of None with save() function.
Under specific scenarios calling save on a None value wouldn\'t update
previous values. This issue only manifests with a new instantiation of the model,
if existing model is modified and updated the issue will not occur.
@since 3.0.0
@jira_ticket PYTHON-475
@expected_result column value should be updated to None
@test_category object_mapper'

def test_save_to_none(self):

    partition = uuid4()
    cluster = 1
    text = 'set'
    text_list = ['set']
    text_set = set(('set',))
    text_map = {'set': 'set'}
    initial = TestModelSave(partition=partition, cluster=cluster, text=text, text_list=text_list, text_set=text_set, text_map=text_map)
    initial.save()
    current = TestModelSave.objects.get(partition=partition, cluster=cluster)
    self.assertEqual(current.text, text)
    self.assertEqual(current.text_list, text_list)
    self.assertEqual(current.text_set, text_set)
    self.assertEqual(current.text_map, text_map)
    next = TestModelSave(partition=partition, cluster=cluster, text=None, text_list=None, text_set=None, text_map=None)
    next.save()
    current = TestModelSave.objects.get(partition=partition, cluster=cluster)
    self.assertEqual(current.text, None)
    self.assertEqual(current.text_list, [])
    self.assertEqual(current.text_set, set())
    self.assertEqual(current.text_map, {})
