@@ -483,14 +483,6 @@ def test_read_response_returns_cached_reply(self, mock_cache, mock_connection):
483483 mock_cache .is_cachable .return_value = True
484484 mock_cache .get .side_effect = [
485485 None ,
486- CacheEntry (
487- cache_key = CacheKey (
488- command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )
489- ),
490- cache_value = CacheProxyConnection .DUMMY_CACHE_VALUE ,
491- status = CacheEntryStatus .IN_PROGRESS ,
492- connection_ref = mock_connection ,
493- ),
494486 CacheEntry (
495487 cache_key = CacheKey (
496488 command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )
@@ -526,22 +518,14 @@ def test_read_response_returns_cached_reply(self, mock_cache, mock_connection):
526518 proxy_connection .send_command (* ["GET" , "foo" ], ** {"keys" : ["foo" ]})
527519 assert proxy_connection .read_response () == b"bar"
528520 assert proxy_connection ._current_command_cache_entry is None
521+
522+ # cached reply
523+ proxy_connection .send_command (* ["GET" , "foo" ], ** {"keys" : ["foo" ]})
529524 assert proxy_connection .read_response () == b"bar"
525+ assert proxy_connection ._current_command_cache_entry is None
530526
531527 mock_cache .set .assert_has_calls (
532528 [
533- call (
534- CacheEntry (
535- cache_key = CacheKey (
536- command = "GET" ,
537- redis_keys = ("foo" ,),
538- redis_args = ("GET" , "foo" ),
539- ),
540- cache_value = CacheProxyConnection .DUMMY_CACHE_VALUE ,
541- status = CacheEntryStatus .IN_PROGRESS ,
542- connection_ref = mock_connection ,
543- )
544- ),
545529 call (
546530 CacheEntry (
547531 cache_key = CacheKey (
0 commit comments