diff options
-rw-r--r-- | test/helper_tools/ab.exe | bin | 82944 -> 0 bytes | |||
-rw-r--r-- | test/individual_coverage.py | 10 | ||||
-rw-r--r-- | test/mitmproxy/addons/onboardingapp/__init__.py | 0 | ||||
-rw-r--r-- | test/mitmproxy/addons/test_defaults.py | 5 | ||||
-rw-r--r-- | test/mitmproxy/net/test_imports.py | 1 | ||||
-rw-r--r-- | test/mitmproxy/platform/__init__.py | 0 | ||||
-rw-r--r-- | test/mitmproxy/proxy/protocol/test_http2.py | 2 | ||||
-rw-r--r-- | test/mitmproxy/proxy/protocol/test_websocket.py | 2 | ||||
-rw-r--r-- | test/mitmproxy/test_addonmanager.py | 5 | ||||
-rw-r--r-- | test/mitmproxy/test_proxy.py | 1 | ||||
-rw-r--r-- | test/mitmproxy/tools/console/test_pathedit.py | 8 |
11 files changed, 16 insertions, 18 deletions
diff --git a/test/helper_tools/ab.exe b/test/helper_tools/ab.exe Binary files differdeleted file mode 100644 index d68ed0f3..00000000 --- a/test/helper_tools/ab.exe +++ /dev/null diff --git a/test/individual_coverage.py b/test/individual_coverage.py index 35bcd27f..c975b4c8 100644 --- a/test/individual_coverage.py +++ b/test/individual_coverage.py @@ -26,20 +26,20 @@ def run_tests(src, test, fail): if e == 0: if fail: - print("SUCCESS but should have FAILED:", src, "Please remove this file from setup.cfg tool:individual_coverage/exclude.") + print("UNEXPECTED SUCCESS:", src, "Please remove this file from setup.cfg tool:individual_coverage/exclude.") e = 42 else: - print("SUCCESS:", src) + print("SUCCESS: ", src) else: if fail: - print("Ignoring fail:", src) + print("IGNORING FAIL: ", src) e = 0 else: cov = [l for l in stdout.getvalue().split("\n") if (src in l) or ("was never imported" in l)] if len(cov) == 1: - print("FAIL:", cov[0]) + print("FAIL: ", cov[0]) else: - print("FAIL:", src, test, stdout.getvalue(), stdout.getvalue()) + print("FAIL: ", src, test, stdout.getvalue(), stdout.getvalue()) print(stderr.getvalue()) print(stdout.getvalue()) diff --git a/test/mitmproxy/addons/onboardingapp/__init__.py b/test/mitmproxy/addons/onboardingapp/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/mitmproxy/addons/onboardingapp/__init__.py diff --git a/test/mitmproxy/addons/test_defaults.py b/test/mitmproxy/addons/test_defaults.py deleted file mode 100644 index e20466f1..00000000 --- a/test/mitmproxy/addons/test_defaults.py +++ /dev/null @@ -1,5 +0,0 @@ -from mitmproxy import addons - - -def test_defaults(): - assert addons.default_addons() diff --git a/test/mitmproxy/net/test_imports.py b/test/mitmproxy/net/test_imports.py deleted file mode 100644 index b88ef26d..00000000 --- a/test/mitmproxy/net/test_imports.py +++ /dev/null @@ -1 +0,0 @@ -# These are actually tests! diff --git a/test/mitmproxy/platform/__init__.py b/test/mitmproxy/platform/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/mitmproxy/platform/__init__.py diff --git a/test/mitmproxy/proxy/protocol/test_http2.py b/test/mitmproxy/proxy/protocol/test_http2.py index 23027c24..b07257b3 100644 --- a/test/mitmproxy/proxy/protocol/test_http2.py +++ b/test/mitmproxy/proxy/protocol/test_http2.py @@ -11,7 +11,7 @@ from mitmproxy import options from mitmproxy.proxy.config import ProxyConfig import mitmproxy.net -from ....mitmproxy.net import tservers as net_tservers +from ...net import tservers as net_tservers from mitmproxy import exceptions from mitmproxy.net.http import http1, http2 diff --git a/test/mitmproxy/proxy/protocol/test_websocket.py b/test/mitmproxy/proxy/protocol/test_websocket.py index 486e9d64..8dfc4f2b 100644 --- a/test/mitmproxy/proxy/protocol/test_websocket.py +++ b/test/mitmproxy/proxy/protocol/test_websocket.py @@ -11,7 +11,7 @@ from mitmproxy.proxy.config import ProxyConfig from mitmproxy.net import tcp from mitmproxy.net import http -from ....mitmproxy.net import tservers as net_tservers +from ...net import tservers as net_tservers from ... import tservers from mitmproxy.net import websockets diff --git a/test/mitmproxy/test_addonmanager.py b/test/mitmproxy/test_addonmanager.py index 5bb88eb6..e556bf7d 100644 --- a/test/mitmproxy/test_addonmanager.py +++ b/test/mitmproxy/test_addonmanager.py @@ -1,5 +1,6 @@ import pytest +from mitmproxy import addons from mitmproxy import addonmanager from mitmproxy import exceptions from mitmproxy import options @@ -76,6 +77,10 @@ def test_lifecycle(): a.configure_all(o, o.keys()) +def test_defaults(): + assert addons.default_addons() + + def test_simple(): o = options.Options() m = master.Master(o, proxy.DummyServer(o)) diff --git a/test/mitmproxy/test_proxy.py b/test/mitmproxy/test_proxy.py index 7a49c530..e1d0da00 100644 --- a/test/mitmproxy/test_proxy.py +++ b/test/mitmproxy/test_proxy.py @@ -3,7 +3,6 @@ from unittest import mock from OpenSSL import SSL import pytest - from mitmproxy.tools import cmdline from mitmproxy.tools import main from mitmproxy import options diff --git a/test/mitmproxy/tools/console/test_pathedit.py b/test/mitmproxy/tools/console/test_pathedit.py index bd064e5f..b9f51f5a 100644 --- a/test/mitmproxy/tools/console/test_pathedit.py +++ b/test/mitmproxy/tools/console/test_pathedit.py @@ -1,10 +1,10 @@ import os from os.path import normpath +from unittest import mock + from mitmproxy.tools.console import pathedit from mitmproxy.test import tutils -from unittest.mock import patch - class TestPathCompleter: @@ -56,8 +56,8 @@ class TestPathEdit: pe = pathedit.PathEdit("", "") - with patch('urwid.widget.Edit.get_edit_text') as get_text, \ - patch('urwid.widget.Edit.set_edit_text') as set_text: + with mock.patch('urwid.widget.Edit.get_edit_text') as get_text, \ + mock.patch('urwid.widget.Edit.set_edit_text') as set_text: cd = os.path.normpath(tutils.test_data.path("mitmproxy/completion")) get_text.return_value = os.path.join(cd, "a") |