'Tests that assigning the same value on a model will do nothing.'

def test_noop_model_assignation_update(self):

    m0 = TestUpdateModel.create(count=5, text='monkey')
    m1 = TestUpdateModel.get(partition=m0.partition, cluster=m0.cluster)
    with patch.object(self.session, 'execute') as execute:
        m1.save()
    assert (execute.call_count == 0)
    with patch.object(self.session, 'execute') as execute:
        m1.count = 5
        m1.save()
    assert (execute.call_count == 0)
    with patch.object(self.session, 'execute') as execute:
        m1.partition = m0.partition
        m1.save()
    assert (execute.call_count == 0)
    with patch.object(self.session, 'execute') as execute:
        m1.cluster = m0.cluster
        m1.save()
    assert (execute.call_count == 0)
