def acquire_lease(self, expires, response_code=CREATED):
        lease_json = {u"dataset_id": unicode(self.dataset3),
                      u"node_uuid": unicode(self.node3),
                      u"expires": expires}

        return self.assertResult(
            b"POST", b"/configuration/leases",
            request_body=lease_json, expected_code=response_code,
            expected_result=lease_json)
Acquire a lease for ``dataset3`` and ``node3`` with given expiration.
dataset/ETHPy150Open ClusterHQ/flocker/flocker/control/test/test_httpapi.py/LeasesTestsMixin.acquire_lease