From e3d390e036430b9d7cc4b93679229fe118eb583a Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Wed, 27 May 2015 11:18:54 +0200 Subject: cleanup code with autopep8 run the following command: $ autopep8 -i -r -a -a . --- test/test_certutils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/test_certutils.py') diff --git a/test/test_certutils.py b/test/test_certutils.py index c96c5087..4af0197f 100644 --- a/test/test_certutils.py +++ b/test/test_certutils.py @@ -34,6 +34,7 @@ import tutils class TestCertStore: + def test_create_explicit(self): with tutils.tmpdir() as d: ca = certutils.CertStore.from_store(d, "test") @@ -102,6 +103,7 @@ class TestCertStore: class TestDummyCert: + def test_with_ca(self): with tutils.tmpdir() as d: ca = certutils.CertStore.from_store(d, "test") @@ -115,6 +117,7 @@ class TestDummyCert: class TestSSLCert: + def test_simple(self): with open(tutils.test_data.path("data/text_cert"), "rb") as f: d = f.read() @@ -152,5 +155,3 @@ class TestSSLCert: d = f.read() s = certutils.SSLCert.from_der(d) assert s.cn - - -- cgit v1.2.3 From 161bc2cfaa8b70b4c2cab5562784df34013452e1 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Wed, 27 May 2015 11:25:33 +0200 Subject: cleanup code with autoflake run the following command: $ autoflake -r -i --remove-all-unused-imports --remove-unused-variables . --- test/test_certutils.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/test_certutils.py') diff --git a/test/test_certutils.py b/test/test_certutils.py index 4af0197f..115cac4d 100644 --- a/test/test_certutils.py +++ b/test/test_certutils.py @@ -1,6 +1,5 @@ import os from netlib import certutils, certffi -import OpenSSL import tutils # class TestDNTree: @@ -57,13 +56,13 @@ class TestCertStore: def test_add_cert(self): with tutils.tmpdir() as d: - ca = certutils.CertStore.from_store(d, "test") + certutils.CertStore.from_store(d, "test") def test_sans(self): with tutils.tmpdir() as d: ca = certutils.CertStore.from_store(d, "test") c1 = ca.get_cert("foo.com", ["*.bar.com"]) - c2 = ca.get_cert("foo.bar.com", []) + ca.get_cert("foo.bar.com", []) # assert c1 == c2 c3 = ca.get_cert("bar.com", []) assert not c1 == c3 @@ -71,7 +70,7 @@ class TestCertStore: def test_sans_change(self): with tutils.tmpdir() as d: ca = certutils.CertStore.from_store(d, "test") - _ = ca.get_cert("foo.com", ["*.bar.com"]) + ca.get_cert("foo.com", ["*.bar.com"]) cert, key, chain_file = ca.get_cert("foo.bar.com", ["*.baz.com"]) assert "*.baz.com" in cert.altnames -- cgit v1.2.3