def test_volume_target_gets_destroyed_after_destroying_a_node(self):
    node = utils.create_test_node()
    target = utils.create_test_volume_target(node_id=node.id)
    self.dbapi.destroy_node(node.id)
    self.assertRaises(exception.VolumeTargetNotFound, self.dbapi.get_volume_target_by_id, target.id)
def test_volume_target_gets_destroyed_after_destroying_a_node(self):
    node = utils.create_test_node()
    target = utils.create_test_volume_target(node_id=node.id)
    self.dbapi.destroy_node(node.id)
    self.assertRaises(exception.VolumeTargetNotFound, self.dbapi.get_volume_target_by_id, target.id)