mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Add some basic tests for flow_exports
This commit is contained in:
parent
3374be9f4b
commit
abc1552800
22
test/test_export_flow.py
Normal file
22
test/test_export_flow.py
Normal file
@ -0,0 +1,22 @@
|
||||
import netlib.tutils
|
||||
from libmproxy import flow_export
|
||||
from . import tutils
|
||||
|
||||
req_get = netlib.tutils.treq(
|
||||
method='GET',
|
||||
headers=None,
|
||||
content=None,
|
||||
)
|
||||
|
||||
req_post = netlib.tutils.treq(
|
||||
method='POST',
|
||||
headers=None,
|
||||
)
|
||||
|
||||
|
||||
def test_request_simple():
|
||||
flow = tutils.tflow(req=req_get)
|
||||
assert flow_export.curl_command(flow)
|
||||
|
||||
flow = tutils.tflow(req=req_post)
|
||||
assert flow_export.curl_command(flow)
|
Loading…
Reference in New Issue
Block a user