Skip to content

Commit b240c3f

Browse files
jakewinstechnige
authored andcommitted
Add failing test to illustrate issue found at hackathon
1 parent 3a29e88 commit b240c3f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/test_session.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ def test_can_run_simple_statement(self):
4848
session.close()
4949
assert count == 1
5050

51+
def test_can_run_simple_statement_with_params(self):
52+
session = GraphDatabase.driver("bolt://localhost").session()
53+
count = 0
54+
for record in session.run("RETURN {x} AS n", {"x": {"abc":["d", "e", "f"]}}):
55+
assert record[0] == {"abc":["d", "e", "f"]}
56+
assert record["n"] == {"abc":["d", "e", "f"]}
57+
assert repr(record)
58+
assert len(record) == 1
59+
count += 1
60+
session.close()
61+
assert count == 1
62+
5163
def test_fails_on_bad_syntax(self):
5264
session = GraphDatabase.driver("bolt://localhost").session()
5365
with self.assertRaises(CypherError):

0 commit comments

Comments
 (0)