mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
extend tests for headers.replace()
This commit is contained in:
parent
3c1ced2b17
commit
2a5164351f
@ -88,6 +88,12 @@ class TestHeaders:
|
||||
headers = Headers(Host="foobarfoo.com", Accept="foo/bar")
|
||||
replacements = headers.replace("foo", "bar", count=1)
|
||||
assert replacements == 1
|
||||
assert headers["Host"] == "barbarfoo.com"
|
||||
assert headers["Accept"] == "foo/bar"
|
||||
replacements = headers.replace("foo", "bar", count=2)
|
||||
assert replacements == 2
|
||||
assert headers["Host"] == "barbarbar.com"
|
||||
assert headers["Accept"] == "bar/bar"
|
||||
|
||||
|
||||
def test_parse_content_type():
|
||||
|
Loading…
Reference in New Issue
Block a user