def test_renew(self):
        self.clock.advance(self.now)
        expires = 40
        expected_expiration = datetime.fromtimestamp(
            self.clock.seconds() + expires, UTC)

        # Acquire with no expiration:
        d = self.acquire_lease(None)
        # Re-acquire with expiration:
        d.addCallback(lambda _: self.acquire_lease(expires, OK))

        def acquired(_):
            self.assertEqual(
                self.persistence_service.get().leases[self.dataset3],
                Lease(dataset_id=self.dataset3, node_id=self.node3,
                      expiration=expected_expiration))
        d.addCallback(acquired)
        return d
Acquiring a lease on node A if a lease already exits for that dataset
dataset/ETHPy150Open ClusterHQ/flocker/flocker/control/test/test_httpapi.py/LeasesTestsMixin.test_renew