summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2014-10-12 18:01:24 +0200
committerLV-426 <lv-426@taproot.org.il>2014-10-12 18:01:24 +0200
commit27acfa40abeeacecc8e46088ddb671e04284b7ef (patch)
treecb136547bf01beddad7250ecee10082c46503741
parent749f4efb5cace86377606cf924378ed79d5071d2 (diff)
neo4j_test_util - rand_id(), flush_db()
-rw-r--r--src-py/neo4j_test_util.py10
1 files changed, 10 insertions, 0 deletions
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')