aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/test_examples.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/mitmproxy/test_examples.py')
-rw-r--r--test/mitmproxy/test_examples.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/mitmproxy/test_examples.py b/test/mitmproxy/test_examples.py
index b560d9a1..0c117306 100644
--- a/test/mitmproxy/test_examples.py
+++ b/test/mitmproxy/test_examples.py
@@ -5,11 +5,12 @@ from contextlib import contextmanager
from mitmproxy import utils, script
from mitmproxy.proxy import config
+import netlib.utils
from netlib import tutils as netutils
from netlib.http import Headers
from . import tservers, tutils
-example_dir = utils.Data(__name__).path("../../examples")
+example_dir = netlib.utils.Data(__name__).path("../../examples")
class DummyContext(object):
@@ -106,8 +107,8 @@ def test_modify_querystring():
def test_modify_response_body():
with tutils.raises(script.ScriptException):
- with example("modify_response_body.py") as ex:
- pass
+ with example("modify_response_body.py"):
+ assert True
flow = tutils.tflow(resp=netutils.tresp(content="I <3 mitmproxy"))
with example("modify_response_body.py mitmproxy rocks") as ex:
@@ -125,7 +126,7 @@ def test_redirect_requests():
def test_har_extractor():
with tutils.raises(script.ScriptException):
- with example("har_extractor.py") as ex:
+ with example("har_extractor.py"):
pass
times = dict(