diff options
author | Maximilian Hils <git@maximilianhils.com> | 2018-01-05 16:04:02 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2018-01-05 16:45:43 +0100 |
commit | c2adcb58f4f5f221d10599db2c97e6cf828157c1 (patch) | |
tree | 49b83dde509fab8ecec1d7cd720e8610d3ba1226 /mitmproxy/test | |
parent | c1c1652082f680e7448e44cfbbb536223a100a09 (diff) | |
download | mitmproxy-c2adcb58f4f5f221d10599db2c97e6cf828157c1.tar.gz mitmproxy-c2adcb58f4f5f221d10599db2c97e6cf828157c1.tar.bz2 mitmproxy-c2adcb58f4f5f221d10599db2c97e6cf828157c1.zip |
fix test flow timestamps to values that don't overflow in certain timezones
Diffstat (limited to 'mitmproxy/test')
-rw-r--r-- | mitmproxy/test/tflow.py | 22 | ||||
-rw-r--r-- | mitmproxy/test/tutils.py | 8 |
2 files changed, 15 insertions, 15 deletions
diff --git a/mitmproxy/test/tflow.py b/mitmproxy/test/tflow.py index 91747866..05d194d6 100644 --- a/mitmproxy/test/tflow.py +++ b/mitmproxy/test/tflow.py @@ -53,8 +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, + timestamp_start=946681200, + timestamp_end=946681201, content=b'' ) resp = http.HTTPResponse( @@ -66,8 +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, + timestamp_start=946681202, + timestamp_end=946681203, content=b'', ) handshake_flow = http.HTTPFlow(client_conn, server_conn) @@ -158,9 +158,9 @@ def tclient_conn(): clientcert=None, mitmcert=None, ssl_established=False, - timestamp_start=1, - timestamp_ssl_setup=2, - timestamp_end=3, + timestamp_start=946681200, + timestamp_ssl_setup=946681201, + timestamp_end=946681206, sni="address", cipher_name="cipher", alpn_proto_negotiated=b"http/1.1", @@ -182,10 +182,10 @@ def tserver_conn(): source_address=("address", 22), ip_address=("192.168.0.1", 22), cert=None, - timestamp_start=1, - timestamp_tcp_setup=2, - timestamp_ssl_setup=3, - timestamp_end=4, + timestamp_start=946681202, + timestamp_tcp_setup=946681203, + timestamp_ssl_setup=946681204, + timestamp_end=946681205, ssl_established=False, sni="address", alpn_proto_negotiated=None, diff --git a/mitmproxy/test/tutils.py b/mitmproxy/test/tutils.py index cd9f3b3f..d5b52bbe 100644 --- a/mitmproxy/test/tutils.py +++ b/mitmproxy/test/tutils.py @@ -31,8 +31,8 @@ def treq(**kwargs): http_version=b"HTTP/1.1", headers=http.Headers(((b"header", b"qvalue"), (b"content-length", b"7"))), content=b"content", - timestamp_start=1, - timestamp_end=2, + timestamp_start=946681200, + timestamp_end=946681201, ) default.update(kwargs) return http.Request(**default) @@ -49,8 +49,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=1, - timestamp_end=2, + timestamp_start=946681202, + timestamp_end=946681203, ) default.update(kwargs) return http.Response(**default) |