diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-04-14 11:58:10 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-04-14 11:58:10 +1200 |
commit | bea0bd236a60e3e6c80027448e51b7802394304a (patch) | |
tree | 1cc160e19eb1834703798503f1818e4278bce1b2 /test/tutils.py | |
parent | f37efecd0a22313eacad33251512ef371557fde7 (diff) | |
download | mitmproxy-bea0bd236a60e3e6c80027448e51b7802394304a.tar.gz mitmproxy-bea0bd236a60e3e6c80027448e51b7802394304a.tar.bz2 mitmproxy-bea0bd236a60e3e6c80027448e51b7802394304a.zip |
Housekeeping and cleanups
- No output to stdout on load in examples - they muck up the test suite.
- Use the odict module directly, rather than aliasing it. The small convenience
this gives to scripters is not worth it.
- Move the cookie tests from the flow test module to the protocol_http test
module.
Diffstat (limited to 'test/tutils.py')
-rw-r--r-- | test/tutils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/tutils.py b/test/tutils.py index e7720d33..499efc6e 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -9,7 +9,7 @@ import mock_urwid from libmproxy.console.flowview import FlowView from libmproxy.console import ConsoleState from libmproxy.protocol.primitives import Error -from netlib import certutils +from netlib import certutils, odict from nose.plugins.skip import SkipTest from mock import Mock from time import time @@ -81,7 +81,7 @@ def treq(content="content", scheme="http", host="address", port=22): """ @return: libmproxy.protocol.http.HTTPRequest """ - headers = flow.ODictCaseless() + headers = odict.ODictCaseless() headers["header"] = ["qvalue"] req = http.HTTPRequest("relative", "GET", scheme, host, port, "/path", (1, 1), headers, content, None, None, None) @@ -104,7 +104,7 @@ def tresp(content="message"): @return: libmproxy.protocol.http.HTTPResponse """ - headers = flow.ODictCaseless() + headers = odict.ODictCaseless() headers["header_response"] = ["svalue"] resp = http.HTTPResponse((1, 1), 200, "OK", headers, content, time(), time()) |