diff options
author | Maximilian Hils <git@maximilianhils.com> | 2019-09-05 22:08:18 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2019-09-05 22:08:21 +0200 |
commit | e77f375186403cee05dc66c069ed1155059b2d63 (patch) | |
tree | 9a56bba44906f054d866db5cf3b9aca77c66d9fc /test | |
parent | ebfff8db761bf101ae46ac9ca0983408897baad2 (diff) | |
download | mitmproxy-e77f375186403cee05dc66c069ed1155059b2d63.tar.gz mitmproxy-e77f375186403cee05dc66c069ed1155059b2d63.tar.bz2 mitmproxy-e77f375186403cee05dc66c069ed1155059b2d63.zip |
lint
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/addons/test_view.py | 2 | ||||
-rw-r--r-- | test/mitmproxy/script/test_concurrent.py | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/test/mitmproxy/addons/test_view.py b/test/mitmproxy/addons/test_view.py index 976c14b7..f5088a68 100644 --- a/test/mitmproxy/addons/test_view.py +++ b/test/mitmproxy/addons/test_view.py @@ -471,7 +471,7 @@ def test_focus(): v = view.View() v.add([tft()]) f = view.Focus(v) - assert f.index is 0 + assert f.index == 0 assert f.flow is v[0] # Start empty diff --git a/test/mitmproxy/script/test_concurrent.py b/test/mitmproxy/script/test_concurrent.py index 3ec58760..70d41511 100644 --- a/test/mitmproxy/script/test_concurrent.py +++ b/test/mitmproxy/script/test_concurrent.py @@ -43,17 +43,17 @@ class TestConcurrent(tservers.MasterTest): assert await tctx.master.await_log("decorator not supported") def test_concurrent_class(self, tdata): - with taddons.context() as tctx: - sc = tctx.script( - tdata.path( - "mitmproxy/data/addonscripts/concurrent_decorator_class.py" - ) + with taddons.context() as tctx: + sc = tctx.script( + tdata.path( + "mitmproxy/data/addonscripts/concurrent_decorator_class.py" ) - f1, f2 = tflow.tflow(), tflow.tflow() - tctx.cycle(sc, f1) - tctx.cycle(sc, f2) - start = time.time() - while time.time() - start < 5: - if f1.reply.state == f2.reply.state == "committed": - return - raise ValueError("Script never acked") + ) + f1, f2 = tflow.tflow(), tflow.tflow() + tctx.cycle(sc, f1) + tctx.cycle(sc, f2) + start = time.time() + while time.time() - start < 5: + if f1.reply.state == f2.reply.state == "committed": + return + raise ValueError("Script never acked") |