mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 03:14:22 +00:00
Revert "Add API to programmatically create new requests (#1534)"
This reverts commit ccbdcd684b
,
which yielded a test timeout.
This commit is contained in:
parent
19abb54919
commit
611dad12a7
@ -187,10 +187,6 @@ class FlowMaster(controller.Master):
|
|||||||
rt.join()
|
rt.join()
|
||||||
return rt
|
return rt
|
||||||
|
|
||||||
def new_request(self, method, scheme, host, port, path, block=False):
|
|
||||||
f = self.create_request(method, scheme, host, port, path)
|
|
||||||
return self.replay_request(f, block)
|
|
||||||
|
|
||||||
@controller.handler
|
@controller.handler
|
||||||
def log(self, l):
|
def log(self, l):
|
||||||
self.add_log(l.msg, l.level)
|
self.add_log(l.msg, l.level)
|
||||||
|
@ -463,15 +463,6 @@ class TestFlowMaster:
|
|||||||
assert s.flow_count() == 2
|
assert s.flow_count() == 2
|
||||||
assert s.index(f2) == 1
|
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):
|
def test_create_flow(self):
|
||||||
s = flow.State()
|
s = flow.State()
|
||||||
fm = flow.FlowMaster(None, None, s)
|
fm = flow.FlowMaster(None, None, s)
|
||||||
|
Loading…
Reference in New Issue
Block a user