aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2016-02-14 14:45:27 +0100
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2016-02-14 14:45:27 +0100
commit6746cf5f546bedd0486edd23d5253759920e1448 (patch)
tree1875b08e96662663cb8228430ea08395dfbe5d5c /test
parentefcfc62b73ac484ed25727f476c7ad0bb25817d5 (diff)
downloadmitmproxy-6746cf5f546bedd0486edd23d5253759920e1448.tar.gz
mitmproxy-6746cf5f546bedd0486edd23d5253759920e1448.tar.bz2
mitmproxy-6746cf5f546bedd0486edd23d5253759920e1448.zip
autoflake
Diffstat (limited to 'test')
-rw-r--r--test/test_console_help.py2
-rw-r--r--test/test_filt.py4
-rw-r--r--test/test_flow.py4
-rw-r--r--test/test_protocol_http1.py3
-rw-r--r--test/test_protocol_http2.py4
5 files changed, 6 insertions, 11 deletions
diff --git a/test/test_console_help.py b/test/test_console_help.py
index 32d94247..42862af7 100644
--- a/test/test_console_help.py
+++ b/test/test_console_help.py
@@ -28,7 +28,7 @@ class TestHelp:
assert h.helptext()
def test_keypress(self):
- master = DummyMaster()
+ DummyMaster()
h = help.HelpView([1, 2, 3])
assert not h.keypress((0, 0), "q")
assert not h.keypress((0, 0), "?")
diff --git a/test/test_filt.py b/test/test_filt.py
index b1f3a21f..49886371 100644
--- a/test/test_filt.py
+++ b/test/test_filt.py
@@ -209,7 +209,7 @@ class TestMatching:
def test_method(self):
q = self.req()
- s = self.resp()
+ self.resp()
assert self.q("~m get", q)
assert not self.q("~m post", q)
@@ -218,7 +218,7 @@ class TestMatching:
def test_domain(self):
q = self.req()
- s = self.resp()
+ self.resp()
assert self.q("~d host", q)
assert not self.q("~d none", q)
diff --git a/test/test_flow.py b/test/test_flow.py
index 51b88fff..fe2a45bf 100644
--- a/test/test_flow.py
+++ b/test/test_flow.py
@@ -350,7 +350,7 @@ class TestFlow(object):
def test_copy(self):
f = tutils.tflow(resp=True)
- a0 = f.get_state()
+ f.get_state()
f2 = f.copy()
a = f.get_state()
b = f2.get_state()
@@ -532,7 +532,7 @@ class TestState:
assert c.flow_count() == 2
assert c.active_flow_count() == 1
- _ = HTTPResponse.wrap(netlib.tutils.tresp())
+ HTTPResponse.wrap(netlib.tutils.tresp())
assert not c.update_flow(None)
assert c.active_flow_count() == 1
diff --git a/test/test_protocol_http1.py b/test/test_protocol_http1.py
index a1485f1b..13e0eabe 100644
--- a/test/test_protocol_http1.py
+++ b/test/test_protocol_http1.py
@@ -1,7 +1,6 @@
-from netlib.exceptions import HttpSyntaxException
from netlib.http import http1
from netlib.tcp import TCPClient
-from netlib.tutils import treq, raises
+from netlib.tutils import treq
from . import tutils, tservers
diff --git a/test/test_protocol_http2.py b/test/test_protocol_http2.py
index 38cfdfc3..c2c736af 100644
--- a/test/test_protocol_http2.py
+++ b/test/test_protocol_http2.py
@@ -5,10 +5,8 @@ import pytest
import traceback
import os
import tempfile
-import sys
from libmproxy.proxy.config import ProxyConfig
-from libmproxy.proxy.server import ProxyServer
from libmproxy.cmdline import APP_HOST, APP_PORT
import logging
@@ -24,9 +22,7 @@ from netlib import tservers as netlib_tservers
from netlib.utils import http2_read_raw_frame
import h2
-from hyperframe.frame import Frame
-from libmproxy import utils
from . import tservers
requires_alpn = pytest.mark.skipif(