diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/tools/web/test_app.py | 10 | ||||
-rw-r--r-- | test/mitmproxy/tools/web/test_static_viewer.py | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/test/mitmproxy/tools/web/test_app.py b/test/mitmproxy/tools/web/test_app.py index aaf949a8..6b88823c 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.data") 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.data" ).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.data").code == 400 f.revert() def test_update_flow_content(self): assert self.fetch( - "/flows/42/request/_content", + "/flows/42/request/content.data", 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.data", method="POST", headers={"Content-Type": 'multipart/form-data; boundary="somefancyboundary"'}, body=body diff --git a/test/mitmproxy/tools/web/test_static_viewer.py b/test/mitmproxy/tools/web/test_static_viewer.py index 138c3add..5b7ddfff 100644 --- a/test/mitmproxy/tools/web/test_static_viewer.py +++ b/test/mitmproxy/tools/web/test_static_viewer.py @@ -43,9 +43,9 @@ def test_save_flows_content(ctx, tmpdir): for p in flows_path.listdir(): assert p.join('request').check(dir=1) assert p.join('response').check(dir=1) - assert p.join('request/_content').check(file=1) + assert p.join('request/content.data').check(file=1) assert p.join('request/content').check(dir=1) - assert p.join('response/_content').check(file=1) + assert p.join('response/content.data').check(file=1) assert p.join('response/content').check(dir=1) assert p.join('request/content/Auto.json').check(file=1) assert p.join('response/content/Auto.json').check(file=1) |