@@ -357,7 +357,7 @@ def test_network_connection_failure():
357357
358358@pytest .mark .skipif (
359359 not hasattr (socket , "AF_UNIX" ),
360- reason = "Unix domain sockets not supported on this platform"
360+ reason = "Unix domain sockets not supported on this platform" ,
361361)
362362def test_unix_socket_connection_failure ():
363363 exp_err = "Error 2 connecting to unix:///tmp/a.sock. No such file or directory."
@@ -468,25 +468,33 @@ def test_read_response_returns_cached_reply(self, mock_cache, mock_connection):
468468 None ,
469469 None ,
470470 CacheEntry (
471- cache_key = CacheKey (command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )),
471+ cache_key = CacheKey (
472+ command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )
473+ ),
472474 cache_value = CacheProxyConnection .DUMMY_CACHE_VALUE ,
473475 status = CacheEntryStatus .IN_PROGRESS ,
474476 connection_ref = mock_connection ,
475477 ),
476478 CacheEntry (
477- cache_key = CacheKey (command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )),
479+ cache_key = CacheKey (
480+ command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )
481+ ),
478482 cache_value = b"bar" ,
479483 status = CacheEntryStatus .VALID ,
480484 connection_ref = mock_connection ,
481485 ),
482486 CacheEntry (
483- cache_key = CacheKey (command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )),
487+ cache_key = CacheKey (
488+ command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )
489+ ),
484490 cache_value = b"bar" ,
485491 status = CacheEntryStatus .VALID ,
486492 connection_ref = mock_connection ,
487493 ),
488494 CacheEntry (
489- cache_key = CacheKey (command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )),
495+ cache_key = CacheKey (
496+ command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )
497+ ),
490498 cache_value = b"bar" ,
491499 status = CacheEntryStatus .VALID ,
492500 connection_ref = mock_connection ,
@@ -508,15 +516,23 @@ def test_read_response_returns_cached_reply(self, mock_cache, mock_connection):
508516 [
509517 call (
510518 CacheEntry (
511- cache_key = CacheKey (command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )),
519+ cache_key = CacheKey (
520+ command = "GET" ,
521+ redis_keys = ("foo" ,),
522+ redis_args = ("GET" , "foo" ),
523+ ),
512524 cache_value = CacheProxyConnection .DUMMY_CACHE_VALUE ,
513525 status = CacheEntryStatus .IN_PROGRESS ,
514526 connection_ref = mock_connection ,
515527 )
516528 ),
517529 call (
518530 CacheEntry (
519- cache_key = CacheKey (command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )),
531+ cache_key = CacheKey (
532+ command = "GET" ,
533+ redis_keys = ("foo" ,),
534+ redis_args = ("GET" , "foo" ),
535+ ),
520536 cache_value = b"bar" ,
521537 status = CacheEntryStatus .VALID ,
522538 connection_ref = mock_connection ,
@@ -527,9 +543,21 @@ def test_read_response_returns_cached_reply(self, mock_cache, mock_connection):
527543
528544 mock_cache .get .assert_has_calls (
529545 [
530- call (CacheKey (command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" ))),
531- call (CacheKey (command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" ))),
532- call (CacheKey (command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" ))),
546+ call (
547+ CacheKey (
548+ command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )
549+ )
550+ ),
551+ call (
552+ CacheKey (
553+ command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )
554+ )
555+ ),
556+ call (
557+ CacheKey (
558+ command = "GET" , redis_keys = ("foo" ,), redis_args = ("GET" , "foo" )
559+ )
560+ ),
533561 ]
534562 )
535563
0 commit comments