def test_node_added(self): xml = """<pipes name="TestPipe" description="" label="" rwType="READ_WRITE" displayLevel="OPERATOR"/>""" root = objectify.fromstring(xml) graph = Graph(name="Device Class Map") add_pipe(graph, root) assert "\tTestPipe_PIPE" in graph.source
def test_raises_exception_when_root_none(self): graph = Graph(name="Device Class Map") with pytest.raises(Exception): add_pipe(graph, None)
def test_raises_exception_when_graph_none(self): root = objectify.fromstring("<deviceProperties/>") with pytest.raises(Exception): add_pipe(None, root)