@@ -448,7 +448,8 @@ def ca_file(tmpdir):
448
448
builder = builder .serial_number (int (uuid .uuid4 ()))
449
449
builder = builder .public_key (public_key )
450
450
builder = builder .add_extension (
451
- x509 .BasicConstraints (ca = True , path_length = None ), critical = True ,
451
+ x509 .BasicConstraints (ca = True , path_length = None ),
452
+ critical = True ,
452
453
)
453
454
454
455
certificate = builder .sign (
@@ -457,7 +458,9 @@ def ca_file(tmpdir):
457
458
458
459
ca_file = tmpdir .join ("test.pem" )
459
460
ca_file .write_binary (
460
- certificate .public_bytes (encoding = serialization .Encoding .PEM ,)
461
+ certificate .public_bytes (
462
+ encoding = serialization .Encoding .PEM ,
463
+ )
461
464
)
462
465
463
466
return str (ca_file ).encode ("ascii" )
@@ -509,7 +512,13 @@ def test_set_cipher_list_no_cipher_match(self, context):
509
512
with pytest .raises (Error ) as excinfo :
510
513
context .set_cipher_list (b"imaginary-cipher" )
511
514
assert excinfo .value .args == (
512
- [("SSL routines" , "SSL_CTX_set_cipher_list" , "no cipher match" ,)],
515
+ [
516
+ (
517
+ "SSL routines" ,
518
+ "SSL_CTX_set_cipher_list" ,
519
+ "no cipher match" ,
520
+ )
521
+ ],
513
522
)
514
523
515
524
def test_load_client_ca (self , context , ca_file ):
@@ -644,7 +653,8 @@ def test_use_privatekey_file_bytes(self, tmpfile):
644
653
instance giving the file name to ``Context.use_privatekey_file``.
645
654
"""
646
655
self ._use_privatekey_file_test (
647
- tmpfile + NON_ASCII .encode (getfilesystemencoding ()), FILETYPE_PEM ,
656
+ tmpfile + NON_ASCII .encode (getfilesystemencoding ()),
657
+ FILETYPE_PEM ,
648
658
)
649
659
650
660
def test_use_privatekey_file_unicode (self , tmpfile ):
@@ -653,7 +663,8 @@ def test_use_privatekey_file_unicode(self, tmpfile):
653
663
instance giving the file name to ``Context.use_privatekey_file``.
654
664
"""
655
665
self ._use_privatekey_file_test (
656
- tmpfile .decode (getfilesystemencoding ()) + NON_ASCII , FILETYPE_PEM ,
666
+ tmpfile .decode (getfilesystemencoding ()) + NON_ASCII ,
667
+ FILETYPE_PEM ,
657
668
)
658
669
659
670
def test_use_certificate_wrong_args (self ):
0 commit comments