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)
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)
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)
def test_nonempty(self): self.assertFalse(b2n.is_empty(self.graph))