From d48909469a9e53d32f1e4bd8df0b86149707cf30 Mon Sep 17 00:00:00 2001 From: Vishal Bulbule Date: Sun, 20 Sep 2026 00:17:42 +0530 Subject: [PATCH] test(redis): cover a backslash in list_sessions glob escaping _escape_glob escapes the backslash along with *, ?, [ and ], but the test that list_sessions matches app and user IDs literally had no backslash case. Add one, which also covers user IDs such as CORP\alice. --- tests/unittests/integrations/redis/test_redis_session_service.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unittests/integrations/redis/test_redis_session_service.py b/tests/unittests/integrations/redis/test_redis_session_service.py index 8197dcd91b7..9458c80b145 100644 --- a/tests/unittests/integrations/redis/test_redis_session_service.py +++ b/tests/unittests/integrations/redis/test_redis_session_service.py @@ -222,6 +222,7 @@ async def test_list_sessions_glob_metacharacters_match_literally( ("app1", "*", r"test:session:app1:\*:*"), ("app1", "u?", r"test:session:app1:u\?:*"), ("app1", "[u]1", r"test:session:app1:\[u\]1:*"), + ("app1", "u\\1", r"test:session:app1:u\\1:*"), ("*", "u1", r"test:session:\*:u1:*"), ): fake_redis.scan_patterns.clear()