aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_certutils.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-05-27 11:25:33 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-05-27 11:25:33 +0200
commit161bc2cfaa8b70b4c2cab5562784df34013452e1 (patch)
treef35ec3ccf8acc580f87089fb695b775596fc9c09 /test/test_certutils.py
parente3d390e036430b9d7cc4b93679229fe118eb583a (diff)
downloadmitmproxy-161bc2cfaa8b70b4c2cab5562784df34013452e1.tar.gz
mitmproxy-161bc2cfaa8b70b4c2cab5562784df34013452e1.tar.bz2
mitmproxy-161bc2cfaa8b70b4c2cab5562784df34013452e1.zip
cleanup code with autoflake
run the following command: $ autoflake -r -i --remove-all-unused-imports --remove-unused-variables .
Diffstat (limited to 'test/test_certutils.py')
-rw-r--r--test/test_certutils.py7
1 files changed, 3 insertions, 4 deletions
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