def test_node_missing_and_gets_created(self): assert_xml_equal( etree_to_str( node._ensure_node_exists(self.nodes, "name-test2", self.state) ), etree_to_str(self.node2), )
def test_node_missing_and_gets_created(self): assert_xml_equal( etree_to_str( node._ensure_node_exists(self.nodes, "name-test2", self.state) ), etree_to_str(self.node2) )
def test_node_missing_no_state(self): assert_raise_library_error( lambda: node._ensure_node_exists(self.nodes, "name-missing"), (severity.ERROR, report_codes.NODE_NOT_FOUND, { "node": "name-missing" }, None), )
def test_node_missing_no_state(self): assert_raise_library_error( lambda: node._ensure_node_exists(self.nodes, "name-missing"), ( severity.ERROR, report_codes.NODE_NOT_FOUND, {"node": "name-missing"}, None ), )
def test_node_missing_not_in_state(self): assert_raise_library_error( lambda: node._ensure_node_exists( self.nodes, "name-missing", self.state ), ( severity.ERROR, report_codes.NODE_NOT_FOUND, {"node": "name-missing", "searched_types": []}, None, ), )
def test_node_already_exists(self): assert_xml_equal( etree_to_str(node._ensure_node_exists(self.nodes, "name-test1")), etree_to_str(self.node1) )
def test_node_already_exists(self): assert_xml_equal( etree_to_str(node._ensure_node_exists(self.nodes, "name-test1")), etree_to_str(self.node1), )