'Test to ensure that an extra DELETE is not sent if an object is read
from the DB with a None value
@since 3.9
@jira_ticket PYTHON-719
@expected_result only three queries are executed, the first one for
inserting the object, the second one for reading it, and the third
one for updating it
@test_category object_mapper'

@execute_count(3)
def test_an_extra_delete_is_not_sent(self):

    partition = uuid4()
    cluster = 1
    TestQueryUpdateModel.objects.create(partition=partition, cluster=cluster)
    obj = TestQueryUpdateModel.objects(partition=partition, cluster=cluster).first()
    self.assertFalse({k: v for (k, v) in obj._values.items() if v.deleted})
    obj.text = 'foo'
    obj.save()
