aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_server.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-09 12:13:01 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-09 12:13:01 +1200
commita63240a8483c0bbc52218380c0c70da46a29f75b (patch)
treeeb2c5b4a0ca15cb95764fc7911891ab9f58c4ef2 /test/test_server.py
parente78b48ab20a7250ccb50c878183ae68ea1748c40 (diff)
downloadmitmproxy-a63240a8483c0bbc52218380c0c70da46a29f75b.tar.gz
mitmproxy-a63240a8483c0bbc52218380c0c70da46a29f75b.tar.bz2
mitmproxy-a63240a8483c0bbc52218380c0c70da46a29f75b.zip
Move pathod service testing truss to nose.
Diffstat (limited to 'test/test_server.py')
-rw-r--r--test/test_server.py32
1 files changed, 14 insertions, 18 deletions
diff --git a/test/test_server.py b/test/test_server.py
index efd269eb..14c5fc88 100644
--- a/test/test_server.py
+++ b/test/test_server.py
@@ -1,31 +1,27 @@
-import urllib, urllib2
+import urllib, urllib2, unittest
import libpathod.test, requests
import tutils
-class uSanity(tutils.ProxTest):
+class Sanity(tutils.ProxTest):
def test_http(self):
assert self.pathod("205").status_code == 205
assert self.log()
-class uProxy(tutils.ProxTest):
+class TestHTTP(Sanity):
+ pass
+
+
+class TestHTTPS(Sanity):
+ ssl = True
+
+
+class TestProxy(tutils.ProxTest):
def test_http(self):
- f = self._get()
- assert f.code == 200
- assert f.read()
- f.close()
+ f = self.pathod("205")
+ assert f.status_code == 205
l = self.log()
assert l[0].address
assert "host" in l[1].headers
- assert l[2].code == 200
-
-
-tests = [
- tutils.TestServer(), [
- uSanity(),
- ],
- tutils.TestServer(ssl=True), [
- uSanity(),
- ],
-]
+ assert l[2].code == 205