mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
fix FlowMaster.create_request, add test
This commit is contained in:
parent
d6e58bd16c
commit
610842cda5
@ -845,6 +845,7 @@ class FlowMaster(controller.Master):
|
||||
|
||||
s = ServerConnection.from_state(dict(
|
||||
address=dict(address=(host, port), use_ipv6=False),
|
||||
peer_address=None,
|
||||
cert=None,
|
||||
sni=host,
|
||||
source_address=dict(address=('', 0), use_ipv6=False),
|
||||
|
@ -809,6 +809,11 @@ class TestFlowMaster:
|
||||
assert s.flow_count() == 2
|
||||
assert s.index(f2) == 1
|
||||
|
||||
def test_create_flow(self):
|
||||
s = flow.State()
|
||||
fm = flow.FlowMaster(None, s)
|
||||
assert fm.create_request("GET", "http", "example.com", 80, "/")
|
||||
|
||||
def test_all(self):
|
||||
s = flow.State()
|
||||
fm = flow.FlowMaster(None, s)
|
||||
|
Loading…
Reference in New Issue
Block a user