'Tests updates from multiple queries reaches the correct value'

def test_concurrent_updates(self):

    instance = TestCounterModel.create()
    new1 = TestCounterModel.get(partition=instance.partition)
    new2 = TestCounterModel.get(partition=instance.partition)
    new1.counter += 5
    new1.save()
    new2.counter += 5
    new2.save()
    actual = TestCounterModel.get(partition=instance.partition)
    assert (actual.counter == 10)
