diff options
author | Tyler St. Onge <tylertstonge@gmail.com> | 2016-10-01 07:06:59 -0400 |
---|---|---|
committer | Thomas Kriechbaumer <Kriechi@users.noreply.github.com> | 2016-10-01 13:06:59 +0200 |
commit | ccbdcd684b5a49c0509610a79dad3f220962a42d (patch) | |
tree | 30630818e6393a21979767264fe9b3a2cc882df2 /test | |
parent | 05e2e55eb8117221a88a88d22e77bf92fbf9111e (diff) | |
download | mitmproxy-ccbdcd684b5a49c0509610a79dad3f220962a42d.tar.gz mitmproxy-ccbdcd684b5a49c0509610a79dad3f220962a42d.tar.bz2 mitmproxy-ccbdcd684b5a49c0509610a79dad3f220962a42d.zip |
Add API to programmatically create new requests (#1534)
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/test_flow.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/mitmproxy/test_flow.py b/test/mitmproxy/test_flow.py index 0fe45afb..82126353 100644 --- a/test/mitmproxy/test_flow.py +++ b/test/mitmproxy/test_flow.py @@ -463,6 +463,15 @@ class TestFlowMaster: assert s.flow_count() == 2 assert s.index(f2) == 1 + def test_new_request(self): + s = flow.State() + fm = flow.FlowMaster( + options.Options(), + DummyServer(ProxyConfig(options.Options())), + s + ) + assert fm.new_request("GET", "http", "example.com", 80, "/") + def test_create_flow(self): s = flow.State() fm = flow.FlowMaster(None, None, s) |