示例#1
0
    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
示例#2
0
 def test_raises_exception_when_root_none(self):
     graph = Graph(name="Device Class Map")
     with pytest.raises(Exception):
         add_pipe(graph, None)
示例#3
0
 def test_raises_exception_when_graph_none(self):
     root = objectify.fromstring("<deviceProperties/>")
     with pytest.raises(Exception):
         add_pipe(None, root)