aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathod
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2016-05-29 13:33:20 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2016-05-29 13:43:20 +0200
commite2447406cc89c5a9c3e20f1faf4f5bb9fd2f55b7 (patch)
treeb37af6f7e7658aa8d4851fde80928475840921f3 /test/pathod
parent5c45ca7f9aba05849bd8db24bb58c1951f79e630 (diff)
downloadmitmproxy-e2447406cc89c5a9c3e20f1faf4f5bb9fd2f55b7.tar.gz
mitmproxy-e2447406cc89c5a9c3e20f1faf4f5bb9fd2f55b7.tar.bz2
mitmproxy-e2447406cc89c5a9c3e20f1faf4f5bb9fd2f55b7.zip
more style cleanup
Diffstat (limited to 'test/pathod')
-rw-r--r--test/pathod/test_language_actions.py4
-rw-r--r--test/pathod/test_language_base.py2
-rw-r--r--test/pathod/test_pathod.py10
3 files changed, 8 insertions, 8 deletions
diff --git a/test/pathod/test_language_actions.py b/test/pathod/test_language_actions.py
index c2e15189..81d2155d 100644
--- a/test/pathod/test_language_actions.py
+++ b/test/pathod/test_language_actions.py
@@ -68,9 +68,9 @@ class TestInject:
def test_spec(self):
e = actions.InjectAt.expr()
v = e.parseString("i0,'foo'")[0]
- assert v.spec() == 'i0,"foo"'
+ assert v.spec() == "i0,'foo'"
- def test_spec(self):
+ def test_spec2(self):
e = actions.InjectAt.expr()
v = e.parseString("i0,@100")[0]
v2 = v.freeze({})
diff --git a/test/pathod/test_language_base.py b/test/pathod/test_language_base.py
index 2e5d9041..22355a3a 100644
--- a/test/pathod/test_language_base.py
+++ b/test/pathod/test_language_base.py
@@ -178,7 +178,7 @@ class TestMisc:
assert base.TokValue.parseString('"val"')[0].val == "val"
assert base.TokValue.parseString('"\'val\'"')[0].val == "'val'"
- def test_value(self):
+ def test_value2(self):
class TT(base.Value):
preamble = "m"
e = TT.expr()
diff --git a/test/pathod/test_pathod.py b/test/pathod/test_pathod.py
index 13b36e36..4d969158 100644
--- a/test/pathod/test_pathod.py
+++ b/test/pathod/test_pathod.py
@@ -51,7 +51,7 @@ class TestNoApi(tutils.DaemonTests):
assert self.getpath("/log").status_code == 404
r = self.getpath("/")
assert r.status_code == 200
- assert not "Log" in r.content
+ assert "Log" not in r.content
class TestNotAfterConnect(tutils.DaemonTests):
@@ -110,7 +110,7 @@ class TestHexdump(tutils.DaemonTests):
hexdump = True
def test_hexdump(self):
- r = self.get(r"200:b'\xf0'")
+ assert self.get(r"200:b'\xf0'")
class TestNocraft(tutils.DaemonTests):
@@ -125,8 +125,8 @@ class TestNocraft(tutils.DaemonTests):
class CommonTests(tutils.DaemonTests):
def test_binarydata(self):
- r = self.get(r"200:b'\xf0'")
- l = self.d.last_log()
+ assert self.get(r"200:b'\xf0'")
+ assert self.d.last_log()
# FIXME: Other binary data elements
@pytest.mark.skip(reason="race condition")
@@ -147,7 +147,7 @@ class CommonTests(tutils.DaemonTests):
def test_logs(self):
assert self.d.clear_log()
assert not self.d.last_log()
- rsp = self.get("202:da")
+ assert self.get("202:da")
assert len(self.d.log()) == 1
assert self.d.clear_log()
assert len(self.d.log()) == 0