diff options
author | Maximilian Hils <git@maximilianhils.com> | 2019-11-15 20:57:03 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2019-11-15 20:57:03 +0100 |
commit | 484e099eb10897b89d83d4b0441b4455faab9422 (patch) | |
tree | 047952d22b7a0e94df39d364e39a24d4e939ca55 /test | |
parent | 01ddda75e8aaab542d2c11b9bc9218a94a342f10 (diff) | |
download | mitmproxy-484e099eb10897b89d83d4b0441b4455faab9422.tar.gz mitmproxy-484e099eb10897b89d83d4b0441b4455faab9422.tar.bz2 mitmproxy-484e099eb10897b89d83d4b0441b4455faab9422.zip |
test coverage++
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/addons/test_export.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/mitmproxy/addons/test_export.py b/test/mitmproxy/addons/test_export.py index 1c16afb2..4b905722 100644 --- a/test/mitmproxy/addons/test_export.py +++ b/test/mitmproxy/addons/test_export.py @@ -77,6 +77,14 @@ class TestExportCurlCommand: assert shlex.split(command)[-2] == '-d' assert shlex.split(command)[-1] == "'&#" + def test_strip_unnecessary(self, get_request): + get_request.request.headers.clear() + get_request.request.headers["host"] = "address" + get_request.request.headers[":authority"] = "address" + get_request.request.headers["accept-encoding"] = "br" + result = """curl --compressed 'http://address:22/path?a=foo&a=bar&b=baz'""" + assert export.curl_command(get_request) == result + class TestExportHttpieCommand: def test_get(self, get_request): |