From 24b0820d0bddcad074209cc1381d92d17207448c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Boros?= Date: Thu, 26 Aug 2021 18:59:08 +0400 Subject: 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. --- t/unit/transport/test_redis.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 't') 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", -- cgit v1.2.1