From d9cb0838093a962f636ef6cda17fd652bc2ef65e Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 5 Mar 2011 15:58:48 +1300 Subject: Reorganize test suite to remove confusion between test utils and libmproxy utils. --- test/utils.py | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 test/utils.py (limited to 'test/utils.py') 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 - - -- cgit v1.2.3