def test_reservation_after_release(self):
    node = utils.create_test_node()
    uuid = node.uuid
    r1 = 'fake-reservation'
    r2 = 'another-reservation'
    self.dbapi.reserve_node(r1, uuid)
    self.dbapi.release_node(r1, uuid)
    self.dbapi.reserve_node(r2, uuid)
    res = self.dbapi.get_node_by_uuid(uuid)
    self.assertEqual(r2, res.reservation)
def test_reservation_after_release(self):
    node = utils.create_test_node()
    uuid = node.uuid
    r1 = 'fake-reservation'
    r2 = 'another-reservation'
    self.dbapi.reserve_node(r1, uuid)
    self.dbapi.release_node(r1, uuid)
    self.dbapi.reserve_node(r2, uuid)
    res = self.dbapi.get_node_by_uuid(uuid)
    self.assertEqual(r2, res.reservation)