@@ -468,24 +468,6 @@ def test_read_response_returns_cached_reply(self, mock_cache, mock_connection):
468
468
status = CacheEntryStatus .IN_PROGRESS ,
469
469
connection_ref = mock_connection ,
470
470
),
471
- CacheEntry (
472
- cache_key = CacheKey (command = "GET" , redis_keys = ("foo" ,)),
473
- cache_value = b"bar" ,
474
- status = CacheEntryStatus .VALID ,
475
- connection_ref = mock_connection ,
476
- ),
477
- CacheEntry (
478
- cache_key = CacheKey (command = "GET" , redis_keys = ("foo" ,)),
479
- cache_value = b"bar" ,
480
- status = CacheEntryStatus .VALID ,
481
- connection_ref = mock_connection ,
482
- ),
483
- CacheEntry (
484
- cache_key = CacheKey (command = "GET" , redis_keys = ("foo" ,)),
485
- cache_value = b"bar" ,
486
- status = CacheEntryStatus .VALID ,
487
- connection_ref = mock_connection ,
488
- ),
489
471
]
490
472
mock_connection .send_command .return_value = Any
491
473
mock_connection .read_response .return_value = b"bar"
@@ -496,9 +478,9 @@ def test_read_response_returns_cached_reply(self, mock_cache, mock_connection):
496
478
)
497
479
proxy_connection .send_command (* ["GET" , "foo" ], ** {"keys" : ["foo" ]})
498
480
assert proxy_connection .read_response () == b"bar"
481
+ assert proxy_connection ._current_command_cache_key is None
499
482
assert proxy_connection .read_response () == b"bar"
500
483
501
- mock_connection .read_response .assert_called_once ()
502
484
mock_cache .set .assert_has_calls (
503
485
[
504
486
call (
@@ -525,9 +507,6 @@ def test_read_response_returns_cached_reply(self, mock_cache, mock_connection):
525
507
call (CacheKey (command = "GET" , redis_keys = ("foo" ,))),
526
508
call (CacheKey (command = "GET" , redis_keys = ("foo" ,))),
527
509
call (CacheKey (command = "GET" , redis_keys = ("foo" ,))),
528
- call (CacheKey (command = "GET" , redis_keys = ("foo" ,))),
529
- call (CacheKey (command = "GET" , redis_keys = ("foo" ,))),
530
- call (CacheKey (command = "GET" , redis_keys = ("foo" ,))),
531
510
]
532
511
)
533
512
0 commit comments