summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2020-08-26 22:50:40 -0400
committerGitHub <noreply@github.com>2020-08-26 21:50:40 -0500
commit048821406137d6aba237c6309009dbe744548208 (patch)
treef38d7d3dacfde9a4ee92dc6754a1bf57941beca8 /tests
parentffab488a52ff60f19d93880e9378f1ebbfda5c85 (diff)
downloadpyopenssl-048821406137d6aba237c6309009dbe744548208.tar.gz
I'm back in black (#941)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_ssl.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/tests/test_ssl.py b/tests/test_ssl.py
index 0860eb8..e405b1a 100644
--- a/tests/test_ssl.py
+++ b/tests/test_ssl.py
@@ -448,7 +448,8 @@ def ca_file(tmpdir):
builder = builder.serial_number(int(uuid.uuid4()))
builder = builder.public_key(public_key)
builder = builder.add_extension(
- x509.BasicConstraints(ca=True, path_length=None), critical=True,
+ x509.BasicConstraints(ca=True, path_length=None),
+ critical=True,
)
certificate = builder.sign(
@@ -457,7 +458,9 @@ def ca_file(tmpdir):
ca_file = tmpdir.join("test.pem")
ca_file.write_binary(
- certificate.public_bytes(encoding=serialization.Encoding.PEM,)
+ certificate.public_bytes(
+ encoding=serialization.Encoding.PEM,
+ )
)
return str(ca_file).encode("ascii")
@@ -509,7 +512,13 @@ class TestContext(object):
with pytest.raises(Error) as excinfo:
context.set_cipher_list(b"imaginary-cipher")
assert excinfo.value.args == (
- [("SSL routines", "SSL_CTX_set_cipher_list", "no cipher match",)],
+ [
+ (
+ "SSL routines",
+ "SSL_CTX_set_cipher_list",
+ "no cipher match",
+ )
+ ],
)
def test_load_client_ca(self, context, ca_file):
@@ -644,7 +653,8 @@ class TestContext(object):
instance giving the file name to ``Context.use_privatekey_file``.
"""
self._use_privatekey_file_test(
- tmpfile + NON_ASCII.encode(getfilesystemencoding()), FILETYPE_PEM,
+ tmpfile + NON_ASCII.encode(getfilesystemencoding()),
+ FILETYPE_PEM,
)
def test_use_privatekey_file_unicode(self, tmpfile):
@@ -653,7 +663,8 @@ class TestContext(object):
instance giving the file name to ``Context.use_privatekey_file``.
"""
self._use_privatekey_file_test(
- tmpfile.decode(getfilesystemencoding()) + NON_ASCII, FILETYPE_PEM,
+ tmpfile.decode(getfilesystemencoding()) + NON_ASCII,
+ FILETYPE_PEM,
)
def test_use_certificate_wrong_args(self):