summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2022-10-25 18:13:53 +0300
committerGitHub <noreply@github.com>2022-10-25 18:13:53 +0300
commit1c2461d82b2987aca583a59a42b4568da2648b17 (patch)
treea10ddcad3fb84061a1330be28d3358a330b89a1c
parent0f2cc69ec2558f8a30d2d41b74a70d97d987f3d1 (diff)
downloadredis-py-1c2461d82b2987aca583a59a42b4568da2648b17.tar.gz
Test `test_get_moveable_keys` was broken (#2411)
* Test `test_get_moveable_keys` was broken * Update test_command_parser.py * Do not sort constant lists Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
-rw-r--r--tests/test_command_parser.py22
1 files changed, 7 insertions, 15 deletions
diff --git a/tests/test_command_parser.py b/tests/test_command_parser.py
index 708c069..6c3ede9 100644
--- a/tests/test_command_parser.py
+++ b/tests/test_command_parser.py
@@ -51,21 +51,13 @@ class TestCommandsParser:
]
args7 = ["MIGRATE", "192.168.1.34", 6379, "key1", 0, 5000]
- assert commands_parser.get_keys(r, *args1).sort() == ["key1", "key2"].sort()
- assert (
- commands_parser.get_keys(r, *args2).sort() == ["mystream", "writers"].sort()
- )
- assert (
- commands_parser.get_keys(r, *args3).sort()
- == ["out", "zset1", "zset2"].sort()
- )
- assert commands_parser.get_keys(r, *args4).sort() == ["Sicily", "out"].sort()
- assert commands_parser.get_keys(r, *args5).sort() == ["foo"].sort()
- assert (
- commands_parser.get_keys(r, *args6).sort()
- == ["key1", "key2", "key3"].sort()
- )
- assert commands_parser.get_keys(r, *args7).sort() == ["key1"].sort()
+ assert sorted(commands_parser.get_keys(r, *args1)) == ["key1", "key2"]
+ assert sorted(commands_parser.get_keys(r, *args2)) == ["mystream", "writers"]
+ assert sorted(commands_parser.get_keys(r, *args3)) == ["out", "zset1", "zset2"]
+ assert sorted(commands_parser.get_keys(r, *args4)) == ["Sicily", "out"]
+ assert sorted(commands_parser.get_keys(r, *args5)) == ["foo"]
+ assert sorted(commands_parser.get_keys(r, *args6)) == ["key1", "key2", "key3"]
+ assert sorted(commands_parser.get_keys(r, *args7)) == ["key1"]
# A bug in redis<7.0 causes this to fail: https://github.com/redis/redis/issues/9493
@skip_if_server_version_lt("7.0.0")