diff options
Diffstat (limited to 'test/test_pathod.py')
-rw-r--r-- | test/test_pathod.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py index 0adba8e6..58477620 100644 --- a/test/test_pathod.py +++ b/test/test_pathod.py @@ -1,5 +1,6 @@ from libpathod import pathod, version from netlib import tcp, http +import requests import tutils class TestPathod: @@ -26,6 +27,17 @@ class TestPathod: assert len(p.get_log()) <= p.LOGBUF +class TestNoWeb(tutils.DaemonTests): + noweb = True + def setUp(self): + # Over ride log clearing + pass + + def test_noweb(self): + assert self.get("200").status_code == 200 + assert self.getpath("/").status_code == 800 + + class CommonTests(tutils.DaemonTests): def test_sizelimit(self): r = self.get("200:b@1g") @@ -67,7 +79,7 @@ class CommonTests(tutils.DaemonTests): def test_invalid_first_line(self): c = tcp.TCPClient("localhost", self.d.port) c.connect() - if self.SSL: + if self.ssl: c.convert_to_ssl() c.wfile.write("foo\n\n\n") c.wfile.flush() @@ -92,11 +104,11 @@ class CommonTests(tutils.DaemonTests): class TestDaemon(CommonTests): - SSL = False + ssl = False class TestDaemonSSL(CommonTests): - SSL = True + ssl = True def test_ssl_conn_failure(self): c = tcp.TCPClient("localhost", self.d.port) c.rbufsize = 0 |