'DELETE ``/configuration/leases/<dataset_id>`` releases that lease.'

def test_delete_existing(self):

    d = self.save_leases()
    d.addCallback((lambda _: self.assertResult('DELETE', ('/configuration/leases/' + bytes(self.dataset1)), request_body=None, expected_code=OK, expected_result=self.expected_lease1)))
    def deleted(_):
        self.assertEqual(self.persistence_service.get().leases.keys(), [self.dataset2])
    d.addCallback(deleted)
    return d
