aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatthew Shao <me@matshao.com>2017-08-15 22:23:21 +0800
committerMatthew Shao <me@matshao.com>2017-08-16 09:42:24 +0800
commit3f497640ab0a69838fb605ed9a4b1cee76e462aa (patch)
tree7efd2fa1b4351033ee2054e04daa2abdf745f9fa /test
parent6560b0dcdba72085ce6c53d68a9e01d293936893 (diff)
downloadmitmproxy-3f497640ab0a69838fb605ed9a4b1cee76e462aa.tar.gz
mitmproxy-3f497640ab0a69838fb605ed9a4b1cee76e462aa.tar.bz2
mitmproxy-3f497640ab0a69838fb605ed9a4b1cee76e462aa.zip
[web] Update tests.
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/tools/web/test_app.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/mitmproxy/tools/web/test_app.py b/test/mitmproxy/tools/web/test_app.py
index 091ef5e8..aaf949a8 100644
--- a/test/mitmproxy/tools/web/test_app.py
+++ b/test/mitmproxy/tools/web/test_app.py
@@ -186,7 +186,7 @@ class TestApp(tornado.testing.AsyncHTTPTestCase):
f.response.headers["Content-Encoding"] = "ran\x00dom"
f.response.headers["Content-Disposition"] = 'inline; filename="filename.jpg"'
- r = self.fetch("/flows/42/response/content")
+ r = self.fetch("/flows/42/response/_content")
assert r.body == b"message"
assert r.headers["Content-Encoding"] == "random"
assert r.headers["Content-Disposition"] == 'attachment; filename="filename.jpg"'
@@ -194,17 +194,17 @@ class TestApp(tornado.testing.AsyncHTTPTestCase):
del f.response.headers["Content-Disposition"]
f.request.path = "/foo/bar.jpg"
assert self.fetch(
- "/flows/42/response/content"
+ "/flows/42/response/_content"
).headers["Content-Disposition"] == 'attachment; filename=bar.jpg'
f.response.content = b""
- assert self.fetch("/flows/42/response/content").code == 400
+ assert self.fetch("/flows/42/response/_content").code == 400
f.revert()
def test_update_flow_content(self):
assert self.fetch(
- "/flows/42/request/content",
+ "/flows/42/request/_content",
method="POST",
body="new"
).code == 200
@@ -222,7 +222,7 @@ class TestApp(tornado.testing.AsyncHTTPTestCase):
b'--somefancyboundary--\r\n'
)
assert self.fetch(
- "/flows/42/request/content",
+ "/flows/42/request/_content",
method="POST",
headers={"Content-Type": 'multipart/form-data; boundary="somefancyboundary"'},
body=body