summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaz Monsonego <74051729+raz-mon@users.noreply.github.com>2022-12-06 14:52:16 +0200
committerGitHub <noreply@github.com>2022-12-06 14:52:16 +0200
commit6219574b042a6596b150ca8248441198f01f8c87 (patch)
tree8a1bb469e678da2f5da32ff4ef344724b93de42f
parent6fa6cfc9ada2ec1878484ba44a02fdc3c0c691d5 (diff)
downloadredis-py-6219574b042a6596b150ca8248441198f01f8c87.tar.gz
Updating graph tests to support new execution plan (#2486)
-rw-r--r--tests/test_asyncio/test_graph.py14
-rw-r--r--tests/test_graph.py14
-rw-r--r--tox.ini2
3 files changed, 11 insertions, 19 deletions
diff --git a/tests/test_asyncio/test_graph.py b/tests/test_asyncio/test_graph.py
index 7824256..7e70baa 100644
--- a/tests/test_asyncio/test_graph.py
+++ b/tests/test_asyncio/test_graph.py
@@ -406,7 +406,7 @@ async def test_execution_plan(modclient: redis.Redis):
"MATCH (r:Rider)-[:rides]->(t:Team) WHERE t.name = $name RETURN r.name, t.name, $params", # noqa
{"name": "Yehuda"},
)
- expected = "Results\n Project\n Conditional Traverse | (t:Team)->(r:Rider)\n Filter\n Node By Label Scan | (t:Team)" # noqa
+ expected = "Results\n Project\n Conditional Traverse | (t)->(r:Rider)\n Filter\n Node By Label Scan | (t:Team)" # noqa
assert result == expected
await redis_graph.delete()
@@ -437,11 +437,11 @@ Results
Distinct
Join
Project
- Conditional Traverse | (t:Team)->(r:Rider)
+ Conditional Traverse | (t)->(r:Rider)
Filter
Node By Label Scan | (t:Team)
Project
- Conditional Traverse | (t:Team)->(r:Rider)
+ Conditional Traverse | (t)->(r:Rider)
Filter
Node By Label Scan | (t:Team)"""
assert str(result).replace(" ", "").replace("\n", "") == expected.replace(
@@ -453,9 +453,7 @@ Distinct
Operation("Join")
.append_child(
Operation("Project").append_child(
- Operation(
- "Conditional Traverse", "(t:Team)->(r:Rider)"
- ).append_child(
+ Operation("Conditional Traverse", "(t)->(r:Rider)").append_child(
Operation("Filter").append_child(
Operation("Node By Label Scan", "(t:Team)")
)
@@ -464,9 +462,7 @@ Distinct
)
.append_child(
Operation("Project").append_child(
- Operation(
- "Conditional Traverse", "(t:Team)->(r:Rider)"
- ).append_child(
+ Operation("Conditional Traverse", "(t)->(r:Rider)").append_child(
Operation("Filter").append_child(
Operation("Node By Label Scan", "(t:Team)")
)
diff --git a/tests/test_graph.py b/tests/test_graph.py
index cc6433c..d71df48 100644
--- a/tests/test_graph.py
+++ b/tests/test_graph.py
@@ -497,7 +497,7 @@ def test_execution_plan(client):
"MATCH (r:Rider)-[:rides]->(t:Team) WHERE t.name = $name RETURN r.name, t.name, $params", # noqa
{"name": "Yehuda"},
)
- expected = "Results\n Project\n Conditional Traverse | (t:Team)->(r:Rider)\n Filter\n Node By Label Scan | (t:Team)" # noqa
+ expected = "Results\n Project\n Conditional Traverse | (t)->(r:Rider)\n Filter\n Node By Label Scan | (t:Team)" # noqa
assert result == expected
redis_graph.delete()
@@ -528,11 +528,11 @@ Results
Distinct
Join
Project
- Conditional Traverse | (t:Team)->(r:Rider)
+ Conditional Traverse | (t)->(r:Rider)
Filter
Node By Label Scan | (t:Team)
Project
- Conditional Traverse | (t:Team)->(r:Rider)
+ Conditional Traverse | (t)->(r:Rider)
Filter
Node By Label Scan | (t:Team)"""
assert str(result).replace(" ", "").replace("\n", "") == expected.replace(
@@ -544,9 +544,7 @@ Distinct
Operation("Join")
.append_child(
Operation("Project").append_child(
- Operation(
- "Conditional Traverse", "(t:Team)->(r:Rider)"
- ).append_child(
+ Operation("Conditional Traverse", "(t)->(r:Rider)").append_child(
Operation("Filter").append_child(
Operation("Node By Label Scan", "(t:Team)")
)
@@ -555,9 +553,7 @@ Distinct
)
.append_child(
Operation("Project").append_child(
- Operation(
- "Conditional Traverse", "(t:Team)->(r:Rider)"
- ).append_child(
+ Operation("Conditional Traverse", "(t)->(r:Rider)").append_child(
Operation("Filter").append_child(
Operation("Node By Label Scan", "(t:Team)")
)
diff --git a/tox.ini b/tox.ini
index 4eda45f..85b3242 100644
--- a/tox.ini
+++ b/tox.ini
@@ -94,7 +94,7 @@ volumes =
[docker:redismod]
name = redismod
-image = redis/redis-stack-server:latest
+image = redislabs/redismod:edge
ports =
36379:6379/tcp
healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',36379)) else False"