diff options
| author | LV-426 <lv-426@taproot.org.il> | 2014-10-12 18:01:24 +0200 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2014-10-12 18:01:24 +0200 |
| commit | 27acfa40abeeacecc8e46088ddb671e04284b7ef (patch) | |
| tree | cb136547bf01beddad7250ecee10082c46503741 | |
| parent | 749f4efb5cace86377606cf924378ed79d5071d2 (diff) | |
neo4j_test_util - rand_id(), flush_db()
| -rw-r--r-- | src-py/neo4j_test_util.py | 10 |
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') |
