Skip to content

Commit

Permalink
add CacheEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
zhousheng06 committed Dec 24, 2024
1 parent b897daa commit f0721bc
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f0721bc

Please sign in to comment.