'A ``LeaseReleaseError`` is raised when attempting to release a lease
held by another node.'

def test_error_on_release_lease_held_by_other_node(self):

    leases = self.leases.acquire(self.now, self.dataset_id, self.node_id, self.lease_duration)
    node2 = Node(uuid=uuid4())
    exception = self.assertRaises(LeaseError, leases.release, self.dataset_id, node2.uuid)
    expected_error = u'Cannot    release    lease    {}    for    node    {}:    Lease    already    held    by    another    node'.format(unicode(self.dataset_id), unicode(node2.uuid))
    self.assertEqual(exception.message, expected_error)
