def test_traits_get_destroyed_after_destroying_a_node_by_uuid(self):
    node = utils.create_test_node()
    trait = utils.create_test_node_trait(node_id=node.id)
    self.assertTrue(self.dbapi.node_trait_exists(node.id, trait.trait))
    self.dbapi.destroy_node(node.uuid)
    self.assertRaises(exception.NodeNotFound, self.dbapi.node_trait_exists, node.id, trait.trait)
def test_traits_get_destroyed_after_destroying_a_node_by_uuid(self):
    node = utils.create_test_node()
    trait = utils.create_test_node_trait(node_id=node.id)
    self.assertTrue(self.dbapi.node_trait_exists(node.id, trait.trait))
    self.dbapi.destroy_node(node.uuid)
    self.assertRaises(exception.NodeNotFound, self.dbapi.node_trait_exists, node.id, trait.trait)