From 27acfa40abeeacecc8e46088ddb671e04284b7ef Mon Sep 17 00:00:00 2001 From: LV-426 Date: Sun, 12 Oct 2014 18:01:24 +0200 Subject: neo4j_test_util - rand_id(), flush_db() --- src-py/neo4j_test_util.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src-py/neo4j_test_util.py (limited to 'src-py') diff --git a/src-py/neo4j_test_util.py b/src-py/neo4j_test_util.py new file mode 100644 index 00000000..8edac1b2 --- /dev/null +++ b/src-py/neo4j_test_util.py @@ -0,0 +1,10 @@ +import uuid + +def rand_id(): + return str(uuid.uuid4()) + +def flush_db(db_ctl): + """ + complete DB flush: remove all nodes & links + """ + db_ctl.exec_cypher_query('match (n) optional match (n)-[r]-() delete n,r') -- cgit v1.3.1