aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathod/test_pathoc_cmdline.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2018-04-26 11:47:07 +1200
committerGitHub <noreply@github.com>2018-04-26 11:47:07 +1200
commitb18e0fa2bcac8b55b1d8325f4a2b1f916e3c0d9b (patch)
tree332a42ef3dfd28ec0f4496b1f8ae79464f069069 /test/pathod/test_pathoc_cmdline.py
parent5546f0a05ec21db986f0639cee9e89452ba68642 (diff)
parent95e690ba31db9cb35eaa7e22ecebbe06ea8e2044 (diff)
downloadmitmproxy-b18e0fa2bcac8b55b1d8325f4a2b1f916e3c0d9b.tar.gz
mitmproxy-b18e0fa2bcac8b55b1d8325f4a2b1f916e3c0d9b.tar.bz2
mitmproxy-b18e0fa2bcac8b55b1d8325f4a2b1f916e3c0d9b.zip
Merge pull request #3071 from cortesi/tickless
asyncio: shift script reloading out of the tick event
Diffstat (limited to 'test/pathod/test_pathoc_cmdline.py')
-rw-r--r--test/pathod/test_pathoc_cmdline.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/pathod/test_pathoc_cmdline.py b/test/pathod/test_pathoc_cmdline.py
index 7bc76ace..fecebe3d 100644
--- a/test/pathod/test_pathoc_cmdline.py
+++ b/test/pathod/test_pathoc_cmdline.py
@@ -4,11 +4,9 @@ from unittest import mock
from pathod import pathoc_cmdline as cmdline
-from mitmproxy.test import tutils
-
@mock.patch("argparse.ArgumentParser.error")
-def test_pathoc(perror):
+def test_pathoc(perror, tdata):
assert cmdline.args_pathoc(["pathoc", "foo.com", "get:/"])
s = io.StringIO()
with pytest.raises(SystemExit):
@@ -53,7 +51,7 @@ def test_pathoc(perror):
[
"pathoc",
"foo.com:8888",
- tutils.test_data.path("pathod/data/request")
+ tdata.path("pathod/data/request")
]
)
assert len(list(a.requests)) == 1