Beispiel #1
0
    def setUp(self):
        xml_file = "example.xml"
        cfg = b2n.get_cfg(xml_file)
        root = b2n.get_root(xml_file)

        self.graph = b2n.get_graph(cfg)

        # empty graph
        self.graph.run('MATCH (n) DETACH DELETE n')
        self.assertTrue(b2n.is_empty(self.graph))

        b2n.store2neo(root, cfg)
Beispiel #2
0
    def setUp(self):
        xmlfile = "example.xml"
        cfg = b2n.get_cfg(xmlfile)
        root = b2n.get_root(xmlfile)

        self.graph = b2n.get_graph(cfg)

        # empty graph
        self.graph.run("MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n,r")
        self.assertTrue(b2n.is_empty(self.graph))

        b2n.store2neo(root, cfg)
Beispiel #3
0
    def setUp(self):
        xml_file = "example.xml"
        cfg = b2n.get_cfg(xml_file)
        root = b2n.get_root(xml_file)

        self.modify_config(cfg)
        self.graph = b2n.get_graph(cfg)

        # empty graph
        self.graph.run('MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n,r')
        self.assertTrue(b2n.is_empty(self.graph))

        b2n.store2neo(root, cfg)
Beispiel #4
0
 def test_nonempty(self):
     self.assertFalse(b2n.is_empty(self.graph))
Beispiel #5
0
 def test_nonempty(self):
     self.assertFalse(b2n.is_empty(self.graph))