diff options
Diffstat (limited to 'test/pathod')
-rw-r--r-- | test/pathod/test_language_http2.py | 1 | ||||
-rw-r--r-- | test/pathod/test_pathoc.py | 4 | ||||
-rw-r--r-- | test/pathod/test_pathoc_cmdline.py | 10 | ||||
-rw-r--r-- | test/pathod/tutils.py | 15 |
4 files changed, 16 insertions, 14 deletions
diff --git a/test/pathod/test_language_http2.py b/test/pathod/test_language_http2.py index 4acde3af..de256626 100644 --- a/test/pathod/test_language_http2.py +++ b/test/pathod/test_language_http2.py @@ -141,7 +141,6 @@ class TestRequest: assert isinstance(r.tokens[2], http2.NestedResponse) assert r.values(default_settings()) - def test_render_with_body(self): s = StringIO() r = parse_request("GET:'/foo':bfoobar") diff --git a/test/pathod/test_pathoc.py b/test/pathod/test_pathoc.py index e7818772..6e36c4bf 100644 --- a/test/pathod/test_pathoc.py +++ b/test/pathod/test_pathoc.py @@ -147,7 +147,7 @@ class TestDaemon(_TestDaemon): tutils.raises("ssl handshake", c.connect) def test_showssl(self): - assert not "certificate chain" in self.tval( + assert "certificate chain" not in self.tval( ["get:/p/200"], showssl=True) @@ -170,7 +170,7 @@ class TestDaemon(_TestDaemon): showresp=True, timeout=1 ) - assert not "HTTP" in self.tval( + assert "HTTP" not in self.tval( ["get:'/p/200:p3,100'"], showresp=True, timeout=1, diff --git a/test/pathod/test_pathoc_cmdline.py b/test/pathod/test_pathoc_cmdline.py index f527e861..35909325 100644 --- a/test/pathod/test_pathoc_cmdline.py +++ b/test/pathod/test_pathoc_cmdline.py @@ -29,13 +29,13 @@ def test_pathoc(perror): assert a.connect_to == ["foo", 10] a = cmdline.args_pathoc(["pathoc", "foo.com", "get:/", "--http2"]) - assert a.use_http2 == True - assert a.ssl == True + assert a.use_http2 is True + assert a.ssl is True a = cmdline.args_pathoc(["pathoc", "foo.com", "get:/", "--http2-skip-connection-preface"]) - assert a.use_http2 == True - assert a.ssl == True - assert a.http2_skip_connection_preface == True + assert a.use_http2 is True + assert a.ssl is True + assert a.http2_skip_connection_preface is True a = cmdline.args_pathoc(["pathoc", "-c", "foo", "foo.com:8888", "get:/"]) assert perror.called diff --git a/test/pathod/tutils.py b/test/pathod/tutils.py index d6b7bc1a..f7bb22e5 100644 --- a/test/pathod/tutils.py +++ b/test/pathod/tutils.py @@ -1,15 +1,18 @@ import tempfile import re import shutil +import requests from six.moves import cStringIO as StringIO -import netlib +from netlib import tcp +from netlib import utils +from netlib import tutils + from pathod import language from pathod import pathoc from pathod import pathod from pathod import test -from netlib import tcp -import requests + def treader(bytes): """ @@ -115,11 +118,11 @@ class DaemonTests(object): return ret, logfp.getvalue() -tmpdir = netlib.tutils.tmpdir +tmpdir = tutils.tmpdir -raises = netlib.tutils.raises +raises = tutils.raises -test_data = netlib.utils.Data(__name__) +test_data = utils.Data(__name__) def render(r, settings=language.Settings()): |