aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2011-03-05 15:58:48 +1300
committerAldo Cortesi <aldo@nullcube.com>2011-03-05 15:58:48 +1300
commitd9cb0838093a962f636ef6cda17fd652bc2ef65e (patch)
tree96ee0cf98126da98d06ce3c0eebac5085706df04 /test/utils.py
parent5da4099ddfee61b717c23a8c4227947ecc2f6c53 (diff)
downloadmitmproxy-d9cb0838093a962f636ef6cda17fd652bc2ef65e.tar.gz
mitmproxy-d9cb0838093a962f636ef6cda17fd652bc2ef65e.tar.bz2
mitmproxy-d9cb0838093a962f636ef6cda17fd652bc2ef65e.zip
Reorganize test suite to remove confusion between test utils and libmproxy utils.
Diffstat (limited to 'test/utils.py')
-rw-r--r--test/utils.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/test/utils.py b/test/utils.py
deleted file mode 100644
index 9a00983c..00000000
--- a/test/utils.py
+++ /dev/null
@@ -1,31 +0,0 @@
-import os.path
-from libmproxy import proxy, utils, filt, flow
-
-def treq(conn=None):
- if not conn:
- conn = proxy.ClientConnect(("address", 22))
- headers = utils.Headers()
- headers["header"] = ["qvalue"]
- return proxy.Request(conn, "host", 80, "http", "GET", "/path", headers, "content")
-
-
-def tresp(req=None):
- if not req:
- req = treq()
- headers = utils.Headers()
- headers["header_response"] = ["svalue"]
- return proxy.Response(req, 200, "message", headers, "content_response")
-
-
-def tflow():
- r = treq()
- return flow.Flow(r)
-
-
-def tflow_full():
- r = treq()
- f = flow.Flow(r)
- f.response = tresp(r)
- return f
-
-