mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Add tests for redirect_requests example
This commit is contained in:
parent
2cd5392657
commit
b95cc63b87
@ -13,6 +13,7 @@ from examples import (
|
||||
modify_form,
|
||||
modify_querystring,
|
||||
modify_response_body,
|
||||
redirect_requests,
|
||||
)
|
||||
|
||||
|
||||
@ -96,3 +97,9 @@ def test_iframe_injector():
|
||||
|
||||
content = flow.response.content
|
||||
assert 'iframe' in content and ctx.iframe_url in content
|
||||
|
||||
|
||||
def test_redirect_requests():
|
||||
flow = tutils.tflow(req=netutils.treq(host="example.org"))
|
||||
redirect_requests.request({}, flow)
|
||||
assert flow.request.host == "mitmproxy.org"
|
||||
|
Loading…
Reference in New Issue
Block a user