Skip to content

Commit ebe48eb

Browse files
committed
Search test - Ignore order of the items in the response (#2322)
* fix test * async test
1 parent 800dc0d commit ebe48eb

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
@@ -995,7 +995,7 @@ async def test_aggregations_groupby(modclient: redis.Redis):
995995

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

10001000
req = aggregations.AggregateRequest("redis").group_by(
10011001
"@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)