Skip to content

Commit f0721bc

Browse files
author
zhousheng06
committed
add CacheEntry
1 parent b897daa commit f0721bc

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/test_connection.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,24 @@ def test_read_response_returns_cached_reply(self, mock_cache, mock_connection):
471471
status=CacheEntryStatus.IN_PROGRESS,
472472
connection_ref=mock_connection,
473473
),
474+
CacheEntry(
475+
cache_key=CacheKey(command="GET", redis_keys=("foo",)),
476+
cache_value=b"bar",
477+
status=CacheEntryStatus.VALID,
478+
connection_ref=mock_connection,
479+
),
480+
CacheEntry(
481+
cache_key=CacheKey(command="GET", redis_keys=("foo",)),
482+
cache_value=b"bar",
483+
status=CacheEntryStatus.VALID,
484+
connection_ref=mock_connection,
485+
),
486+
CacheEntry(
487+
cache_key=CacheKey(command="GET", redis_keys=("foo",)),
488+
cache_value=b"bar",
489+
status=CacheEntryStatus.VALID,
490+
connection_ref=mock_connection,
491+
),
474492
]
475493
mock_connection.send_command.return_value = Any
476494
mock_connection.read_response.return_value = b"bar"

0 commit comments

Comments
 (0)