diff options
author | arjun23496 <arjun.k018@gmail.com> | 2016-08-31 10:23:33 +0530 |
---|---|---|
committer | arjun23496 <arjun.k018@gmail.com> | 2016-08-31 10:23:33 +0530 |
commit | d2cfa5ca41c0d8b55000cc4c9fca924c28dfc14a (patch) | |
tree | 0b37f026dcbe430e416152141f123489bba52a02 /test/netlib/http/test_headers.py | |
parent | b3f05966526f46b3239bfa57fe32ed62252221b9 (diff) | |
download | mitmproxy-d2cfa5ca41c0d8b55000cc4c9fca924c28dfc14a.tar.gz mitmproxy-d2cfa5ca41c0d8b55000cc4c9fca924c28dfc14a.tar.bz2 mitmproxy-d2cfa5ca41c0d8b55000cc4c9fca924c28dfc14a.zip |
Added tests for replace in request,message,header
Diffstat (limited to 'test/netlib/http/test_headers.py')
-rw-r--r-- | test/netlib/http/test_headers.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/netlib/http/test_headers.py b/test/netlib/http/test_headers.py index 51537310..b1085e5a 100644 --- a/test/netlib/http/test_headers.py +++ b/test/netlib/http/test_headers.py @@ -75,6 +75,10 @@ class TestHeaders(object): assert replacements == 0 assert headers["Host"] == "example.com" + def test_replace_with_count(self): + headers = Headers(Host="foobarfoo.com", Accept="foo/bar") + replacements = headers.replace("foo","bar",count=1) + assert replacements == 1 def test_parse_content_type(): p = parse_content_type |