From f0721bc228fccd496739c586879625dfb27e3cdf Mon Sep 17 00:00:00 2001 From: zhousheng06 Date: Tue, 24 Dec 2024 16:14:23 +0800 Subject: [PATCH] add CacheEntry --- tests/test_connection.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/test_connection.py b/tests/test_connection.py index f457822e90..0bda2686f2 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -471,6 +471,24 @@ def test_read_response_returns_cached_reply(self, mock_cache, mock_connection): status=CacheEntryStatus.IN_PROGRESS, connection_ref=mock_connection, ), + CacheEntry( + cache_key=CacheKey(command="GET", redis_keys=("foo",)), + cache_value=b"bar", + status=CacheEntryStatus.VALID, + connection_ref=mock_connection, + ), + CacheEntry( + cache_key=CacheKey(command="GET", redis_keys=("foo",)), + cache_value=b"bar", + status=CacheEntryStatus.VALID, + connection_ref=mock_connection, + ), + CacheEntry( + cache_key=CacheKey(command="GET", redis_keys=("foo",)), + cache_value=b"bar", + status=CacheEntryStatus.VALID, + connection_ref=mock_connection, + ), ] mock_connection.send_command.return_value = Any mock_connection.read_response.return_value = b"bar"