From f399a5cd2971675c22a10e48ee9622fb3d86d41f Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Wed, 15 Jun 2016 13:45:35 +0530 Subject: Py3: Fix tests by using byte literals --- test/pathod/test_pathod.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'test/pathod/test_pathod.py') diff --git a/test/pathod/test_pathod.py b/test/pathod/test_pathod.py index ed4ef49f..bffd33e5 100644 --- a/test/pathod/test_pathod.py +++ b/test/pathod/test_pathod.py @@ -66,7 +66,7 @@ class TestCustomCert(tutils.DaemonTests): class TestSSLCN(tutils.DaemonTests): ssl = True ssloptions = dict( - cn="foo.com" + cn=b"foo.com" ) def test_connect(self): @@ -100,7 +100,7 @@ class TestNocraft(tutils.DaemonTests): def test_nocraft(self): r = self.get(r"200:b'\xf0'") assert r.status_code == 800 - assert "Crafting disabled" in r.content + assert b"Crafting disabled" in r.content class CommonTests(tutils.DaemonTests): @@ -137,7 +137,7 @@ class CommonTests(tutils.DaemonTests): def test_static(self): rsp = self.get("200:b Date: Thu, 16 Jun 2016 20:22:49 +0530 Subject: Py3: Store certificate with a byte key Had to debug this for hours! --- test/pathod/test_pathod.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/pathod/test_pathod.py') diff --git a/test/pathod/test_pathod.py b/test/pathod/test_pathod.py index bffd33e5..dc02fffb 100644 --- a/test/pathod/test_pathod.py +++ b/test/pathod/test_pathod.py @@ -52,7 +52,7 @@ class TestNotAfterConnect(tutils.DaemonTests): class TestCustomCert(tutils.DaemonTests): ssl = True ssloptions = dict( - certs=[("*", tutils.test_data.path("data/testkey.pem"))], + certs=[(b"*", tutils.test_data.path("data/testkey.pem"))], ) def test_connect(self): -- cgit v1.2.3 From eb3ed87100ff7c32e5bf040db7eb6ea3d0c06e12 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Fri, 17 Jun 2016 14:15:48 +0200 Subject: move custom HTTP/2 stack from netlib to pathod --- test/pathod/test_pathod.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/pathod/test_pathod.py') diff --git a/test/pathod/test_pathod.py b/test/pathod/test_pathod.py index dc02fffb..0b34f924 100644 --- a/test/pathod/test_pathod.py +++ b/test/pathod/test_pathod.py @@ -3,7 +3,8 @@ from six.moves import cStringIO as StringIO from pathod import pathod from netlib import tcp from netlib.exceptions import HttpException, TlsException -import tutils + +from . import tutils class TestPathod(object): -- cgit v1.2.3