From 88f55312af0d9551f00686d79eaaf1c122740aa1 Mon Sep 17 00:00:00 2001 From: Konstantin Lopuhin Date: Thu, 14 Jan 2016 13:43:37 +0300 Subject: [PATCH] py3 fix in testFactoryInfo - factory attirbutes are bytes in twisted --- tests/test_webclient.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_webclient.py b/tests/test_webclient.py index 05038c407..0a31d8b5d 100644 --- a/tests/test_webclient.py +++ b/tests/test_webclient.py @@ -323,10 +323,10 @@ class WebClientTestCase(unittest.TestCase): return factory.deferred.addCallback(self._cbFactoryInfo, factory) def _cbFactoryInfo(self, ignoredResult, factory): - self.assertEquals(factory.status, '200') - self.assert_(factory.version.startswith('HTTP/')) - self.assertEquals(factory.message, 'OK') - self.assertEquals(factory.response_headers['content-length'], '10') + self.assertEquals(factory.status, b'200') + self.assert_(factory.version.startswith(b'HTTP/')) + self.assertEquals(factory.message, b'OK') + self.assertEquals(factory.response_headers[b'content-length'], b'10') def testRedirect(self): return getPage(self.getURL("redirect")).addCallback(self._cbRedirect)