aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pathod.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-07 16:35:54 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-07 16:35:54 +1200
commit9ae53aecd0b517c2e6149b9a70da2157bced7743 (patch)
treed1f970c87d34d0815970e9ee9b0f85be42453e85 /test/test_pathod.py
parent26c8437e884f310ea80ed31209d3c926ced400e5 (diff)
downloadmitmproxy-9ae53aecd0b517c2e6149b9a70da2157bced7743.tar.gz
mitmproxy-9ae53aecd0b517c2e6149b9a70da2157bced7743.tar.bz2
mitmproxy-9ae53aecd0b517c2e6149b9a70da2157bced7743.zip
We can't sensibly unit test pages withhout firing up a server.
We've just added functionality to do this ourselves, so rip out the old stuff.
Diffstat (limited to 'test/test_pathod.py')
-rw-r--r--test/test_pathod.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py
index af02239e..e4d959eb 100644
--- a/test/test_pathod.py
+++ b/test/test_pathod.py
@@ -31,41 +31,13 @@ class uApplication(libpry.AutoTree):
assert not a.log_by_id(0)
-
-class uPages(libpry.AutoTree):
- def dummy_page(self, path):
- # A hideous, hideous kludge, but Tornado seems to have no more sensible
- # way to do this.
- a = pathod.PathodApp(staticdir=None)
- for h in a.handlers[0][1]:
- if h.regex.match(path):
- klass = h.handler_class
- r = httpserver.HTTPRequest("GET", path)
- del r.connection
- k = klass(a, r)
- k._transforms = []
- return k
-
- def test_index(self):
- page = self.dummy_page("/")
- page.get()
- assert "".join(page._write_buffer)
-
- def test_help(self):
- page = self.dummy_page("/help")
- page.get()
- assert "".join(page._write_buffer)
-
-
class u_make_server(libpry.AutoTree):
def test_simple(self):
app = pathod.PathodApp()
assert pathod.make_server(app, 0, "127.0.0.1", None)
-
tests = [
uApplication(),
- #uPages(),
u_make_server()
]