summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGábor Boros <gabor.brs@gmail.com>2021-08-26 18:59:08 +0400
committerAsif Saif Uddin <auvipy@gmail.com>2021-08-27 16:35:35 +0600
commit24b0820d0bddcad074209cc1381d92d17207448c (patch)
treed7c97f33b1fbb2e466124aecf4a3fe13332e3efa /t
parentcad7a88b3f189f84a81e641abd5689eafc2286fd (diff)
downloadkombu-24b0820d0bddcad074209cc1381d92d17207448c.tar.gz
fix: add missing commands to prefix
Add missing DEL, RPUSH, RPOP and SREM commands to the list of commands to prefix. Also, this commit refactors the prefixing logic a bit to make it simpler.
Diffstat (limited to 't')
-rw-r--r--t/unit/transport/test_redis.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/unit/transport/test_redis.py b/t/unit/transport/test_redis.py
index 3e1f76f5..0f585ca9 100644
--- a/t/unit/transport/test_redis.py
+++ b/t/unit/transport/test_redis.py
@@ -1561,6 +1561,21 @@ class test_GlobalKeyPrefixMixin:
f"{self.global_keyprefix}fake_key"
]
+ def test_prefix_delete_args(self):
+ prefixed_args = self.mixin._prefix_args([
+ "DEL",
+ "fake_key",
+ "fake_key2",
+ "fake_key3"
+ ])
+
+ assert prefixed_args == [
+ "DEL",
+ f"{self.global_keyprefix}fake_key",
+ f"{self.global_keyprefix}fake_key2",
+ f"{self.global_keyprefix}fake_key3",
+ ]
+
def test_prefix_brpop_args(self):
prefixed_args = self.mixin._prefix_args([
"BRPOP",