diff options
Diffstat (limited to 'src-py')
| -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 index d5c30a7f..d5aa640a 100644 --- a/src-py/neo4j_test_util.py +++ b/src-py/neo4j_test_util.py @@ -1,8 +1,18 @@ import uuid +import string +from random import choice +import db_controller as dbc def rand_id(): return str(uuid.uuid4()) +def rand_label(length=8): + """ + return random label + """ + char_set = string.ascii_lowercase + string.ascii_uppercase + string.digits + return ''.join([choice(string.ascii_lowercase)] + [choice(char_set) for _ in range(length - 1)]) + def flush_db(db_ctl): """ complete DB flush: remove all nodes & links |
