def test_reservation_of_reserved_node_fails(self):
    node = utils.create_test_node()
    uuid = node.uuid
    r1 = 'fake-reservation'
    r2 = 'another-reservation'
    self.dbapi.reserve_node(r1, uuid)
    self.assertRaises(exception.NodeLocked, self.dbapi.reserve_node, r2, uuid)
    self.assertRaises(exception.NodeLocked, self.dbapi.release_node, r2, uuid)
def test_reservation_of_reserved_node_fails(self):
    node = utils.create_test_node()
    uuid = node.uuid
    r1 = 'fake-reservation'
    r2 = 'another-reservation'
    self.dbapi.reserve_node(r1, uuid)
    self.assertRaises(exception.NodeLocked, self.dbapi.reserve_node, r2, uuid)
    self.assertRaises(exception.NodeLocked, self.dbapi.release_node, r2, uuid)