Skip to content

Commit 85825b8

Browse files
authored
Search test - Ignore order of the items in the response (#2322)
* fix test * async test
1 parent fcc0c41 commit 85825b8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/test_asyncio/test_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ async def test_aggregations_groupby(modclient: redis.Redis):
992992

993993
res = (await modclient.ft().aggregate(req)).rows[0]
994994
assert res[1] == "redis"
995-
assert res[3] == ["RediSearch", "RedisAI", "RedisJson"]
995+
assert set(res[3]) == {"RediSearch", "RedisAI", "RedisJson"}
996996

997997
req = aggregations.AggregateRequest("redis").group_by(
998998
"@parent", reducers.first_value("@title").alias("first")

tests/test_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ def test_aggregations_groupby(client):
965965

966966
res = client.ft().aggregate(req).rows[0]
967967
assert res[1] == "redis"
968-
assert res[3] == ["RediSearch", "RedisAI", "RedisJson"]
968+
assert set(res[3]) == {"RediSearch", "RedisAI", "RedisJson"}
969969

970970
req = aggregations.AggregateRequest("redis").group_by(
971971
"@parent", reducers.first_value("@title").alias("first")

0 commit comments

Comments
 (0)