aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2017-12-16 10:30:08 +1300
committerAldo Cortesi <aldo@corte.si>2017-12-17 10:11:02 +1300
commitcd913d598da421b4c4e264e029be5f13e3e009bb (patch)
tree7fb418ea9c7d57c9006f0e322ce8127df5d9d390 /mitmproxy/test
parent50a94db2cc2f3107f6f94c1e1407cb6840d1da08 (diff)
downloadmitmproxy-cd913d598da421b4c4e264e029be5f13e3e009bb.tar.gz
mitmproxy-cd913d598da421b4c4e264e029be5f13e3e009bb.tar.bz2
mitmproxy-cd913d598da421b4c4e264e029be5f13e3e009bb.zip
command cuts: add completion
- Remove shortcuts for request, response, etc. - we don't need them if we have completion - Restrict cuts specification to a set of prefixes - Extend cuts to add a few more items
Diffstat (limited to 'mitmproxy/test')
-rw-r--r--mitmproxy/test/tflow.py4
-rw-r--r--mitmproxy/test/tutils.py8
2 files changed, 9 insertions, 3 deletions
diff --git a/mitmproxy/test/tflow.py b/mitmproxy/test/tflow.py
index e754cb54..c3dab30c 100644
--- a/mitmproxy/test/tflow.py
+++ b/mitmproxy/test/tflow.py
@@ -53,6 +53,8 @@ def twebsocketflow(client_conn=True, server_conn=True, messages=True, err=None,
sec_websocket_version="13",
sec_websocket_key="1234",
),
+ timestamp_start=1,
+ timestamp_end=2,
content=b''
)
resp = http.HTTPResponse(
@@ -64,6 +66,8 @@ def twebsocketflow(client_conn=True, server_conn=True, messages=True, err=None,
upgrade='websocket',
sec_websocket_accept=b'',
),
+ timestamp_start=1,
+ timestamp_end=2,
content=b'',
)
handshake_flow = http.HTTPFlow(client_conn, server_conn)
diff --git a/mitmproxy/test/tutils.py b/mitmproxy/test/tutils.py
index 80e5b6fd..bcce547a 100644
--- a/mitmproxy/test/tutils.py
+++ b/mitmproxy/test/tutils.py
@@ -31,7 +31,9 @@ def treq(**kwargs):
path=b"/path",
http_version=b"HTTP/1.1",
headers=http.Headers(((b"header", b"qvalue"), (b"content-length", b"7"))),
- content=b"content"
+ content=b"content",
+ timestamp_start=1,
+ timestamp_end=2,
)
default.update(kwargs)
return http.Request(**default)
@@ -48,8 +50,8 @@ def tresp(**kwargs):
reason=b"OK",
headers=http.Headers(((b"header-response", b"svalue"), (b"content-length", b"7"))),
content=b"message",
- timestamp_start=time.time(),
- timestamp_end=time.time(),
+ timestamp_start=1,
+ timestamp_end=2,
)
default.update(kwargs)
return http.Response(**default)