summaryrefslogtreecommitdiff
path: root/src/server-tests
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2015-01-05 18:40:48 +0200
committerLV-426 <lv-426@taproot.org.il>2015-01-05 18:40:48 +0200
commit870282c1df3bcf0ead8a0f6048aabd941220b30d (patch)
tree9008fe665871628e7060fd1dec2709c717f3811c /src/server-tests
parent89319e8eb9237c6db1840d724c17c8cab76fcd93 (diff)
DB_op#add_statement(): support query addition via query array
Diffstat (limited to 'src/server-tests')
-rw-r--r--src/server-tests/neo4j_test_util.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/server-tests/neo4j_test_util.py b/src/server-tests/neo4j_test_util.py
index cf07f10f..9baecc63 100644
--- a/src/server-tests/neo4j_test_util.py
+++ b/src/server-tests/neo4j_test_util.py
@@ -24,18 +24,14 @@ class DBO_random_data_generation(DB_op):
'|',
'create (:%s {id: \'test-id_\' + toString(rid), n_attr_0:toInt(%d * rand())}))' % (self.n_label, lim_n)
]
-
- q = ' '.join(q_arr)
- self.add_statement(q)
+ self.add_statement(q_arr)
q_arr = ['match (s:%s),(d:%s)' % (self.n_label, self.n_label),
'with s,d',
'limit %d' % (lim_r - 1),
'where rand() < %.2f' % (prob_link_create),
'create (s)-[:%s {l_attr_0:toInt(%d * rand())}]->(d)' % (self.r_label, lim_r)]
-
- q = ' '.join(q_arr)
- self.add_statement(q)
+ self.add_statement(q_arr)
@property
def node_set_label(self):