'``update_leases`` only changes the leases stored in the configuration.'

def test_update_leases_saves_changed_leases(self):

    node_id = uuid4()
    dataset_id = uuid4()
    original_leases = Leases().acquire(datetime.fromtimestamp(0, UTC), uuid4(), node_id)
    def update(leases):
        return leases.acquire(datetime.fromtimestamp(1000, UTC), dataset_id, node_id)
    d = self.persistence_service.save(LATEST_TEST_DEPLOYMENT.set(leases=original_leases))
    d.addCallback((lambda _: update_leases(update, self.persistence_service)))
    def updated(_):
        self.assertEqual(self.persistence_service.get(), LATEST_TEST_DEPLOYMENT.set(leases=update(original_leases)))
    d.addCallback(updated)
    return d
