@@ -357,7 +357,7 @@ def test_network_connection_failure():
357
357
358
358
@pytest .mark .skipif (
359
359
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" ,
361
361
)
362
362
def test_unix_socket_connection_failure ():
363
363
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):
468
468
None ,
469
469
None ,
470
470
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
+ ),
472
474
cache_value = CacheProxyConnection .DUMMY_CACHE_VALUE ,
473
475
status = CacheEntryStatus .IN_PROGRESS ,
474
476
connection_ref = mock_connection ,
475
477
),
476
478
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
+ ),
478
482
cache_value = b"bar" ,
479
483
status = CacheEntryStatus .VALID ,
480
484
connection_ref = mock_connection ,
481
485
),
482
486
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
+ ),
484
490
cache_value = b"bar" ,
485
491
status = CacheEntryStatus .VALID ,
486
492
connection_ref = mock_connection ,
487
493
),
488
494
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
+ ),
490
498
cache_value = b"bar" ,
491
499
status = CacheEntryStatus .VALID ,
492
500
connection_ref = mock_connection ,
@@ -508,15 +516,23 @@ def test_read_response_returns_cached_reply(self, mock_cache, mock_connection):
508
516
[
509
517
call (
510
518
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
+ ),
512
524
cache_value = CacheProxyConnection .DUMMY_CACHE_VALUE ,
513
525
status = CacheEntryStatus .IN_PROGRESS ,
514
526
connection_ref = mock_connection ,
515
527
)
516
528
),
517
529
call (
518
530
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
+ ),
520
536
cache_value = b"bar" ,
521
537
status = CacheEntryStatus .VALID ,
522
538
connection_ref = mock_connection ,
@@ -527,9 +543,21 @@ def test_read_response_returns_cached_reply(self, mock_cache, mock_connection):
527
543
528
544
mock_cache .get .assert_has_calls (
529
545
[
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
+ ),
533
561
]
534
562
)
535
563
0 commit comments