aboutsummaryrefslogtreecommitdiffstats
path: root/test/handler.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-08 10:00:16 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-08 10:00:16 +1200
commit7a312546f3185a2cff36a4f422c852b15b182140 (patch)
treeb536fe0be7b90750d12adc8331fba1e226eb3f03 /test/handler.py
parent903038b8de47cbe79fefec410b8f8913d44a5178 (diff)
downloadmitmproxy-7a312546f3185a2cff36a4f422c852b15b182140.tar.gz
mitmproxy-7a312546f3185a2cff36a4f422c852b15b182140.tar.bz2
mitmproxy-7a312546f3185a2cff36a4f422c852b15b182140.zip
Shift mitmproxy test suite over to pathod.
This opens a whole brave new world of testing for mitmproxy.
Diffstat (limited to 'test/handler.py')
-rw-r--r--test/handler.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/test/handler.py b/test/handler.py
deleted file mode 100644
index 8b717733..00000000
--- a/test/handler.py
+++ /dev/null
@@ -1,24 +0,0 @@
-import socket
-from BaseHTTPServer import BaseHTTPRequestHandler
-
-
-class TestRequestHandler(BaseHTTPRequestHandler):
- default_request_version = "HTTP/1.1"
- def setup(self):
- self.connection = self.request
- self.rfile = socket._fileobject(self.request, "rb", self.rbufsize)
- self.wfile = socket._fileobject(self.request, "wb", self.wbufsize)
-
- def log_message(self, *args, **kwargs):
- # Silence output
- pass
-
- def do_GET(self):
- data = "data: %s\npath: %s\n"%(self.headers, self.path)
- self.send_response(200)
- self.send_header("proxtest", "testing")
- self.send_header("Content-type", "text-html")
- self.send_header("Content-length", len(data))
- self.end_headers()
- self.wfile.write(data)
-