summaryrefslogtreecommitdiff
path: root/repoze/bfg/tests
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-03-31 06:15:13 +0000
committerChris McDonough <chrism@agendaless.com>2009-03-31 06:15:13 +0000
commit2c100e84a36c8ac5fac0684b201ce2050ba1aab0 (patch)
tree3fc30f1d2f27cdf365e7bb1185c3397151ba4e7f /repoze/bfg/tests
parent9d93702e1cdf8806bbc29e2079cc76cbbf114afd (diff)
downloadpyramid-2c100e84a36c8ac5fac0684b201ce2050ba1aab0.tar.gz
pyramid-2c100e84a36c8ac5fac0684b201ce2050ba1aab0.tar.bz2
pyramid-2c100e84a36c8ac5fac0684b201ce2050ba1aab0.zip
- Fix a bug in ``repoze.bfg.wsgi.HTTPException``: the content length
was returned as an int rather than as a string.
Diffstat (limited to 'repoze/bfg/tests')
-rw-r--r--repoze/bfg/tests/test_wsgi.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/repoze/bfg/tests/test_wsgi.py b/repoze/bfg/tests/test_wsgi.py
index 95eaecf80..1fd2393b8 100644
--- a/repoze/bfg/tests/test_wsgi.py
+++ b/repoze/bfg/tests/test_wsgi.py
@@ -30,7 +30,7 @@ class TestNotFound(unittest.TestCase):
self.assertEqual(len(result), 1)
self.failUnless('404 Not Found' in result[0])
self.assertEqual(L[0][0], '404 Not Found')
- self.assertEqual(L[0][1], [('Content-Length', len(result[0])),
+ self.assertEqual(L[0][1], [('Content-Length', str(len(result[0]))),
('Content-Type', 'text/html')])
def test_with_message(self):
@@ -44,7 +44,7 @@ class TestNotFound(unittest.TestCase):
self.failUnless('404 Not Found' in result[0])
self.failUnless('&lt;hi!&gt;' in result[0])
self.assertEqual(L[0][0], '404 Not Found')
- self.assertEqual(L[0][1], [('Content-Length', len(result[0])),
+ self.assertEqual(L[0][1], [('Content-Length', str(len(result[0]))),
('Content-Type', 'text/html')])
class TestUnauthorized(unittest.TestCase):
@@ -65,7 +65,7 @@ class TestUnauthorized(unittest.TestCase):
self.assertEqual(len(result), 1)
self.failUnless('401 Unauthorized' in result[0])
self.assertEqual(L[0][0], '401 Unauthorized')
- self.assertEqual(L[0][1], [('Content-Length', len(result[0])),
+ self.assertEqual(L[0][1], [('Content-Length', str(len(result[0]))),
('Content-Type', 'text/html')])
def test_with_message(self):
@@ -79,7 +79,7 @@ class TestUnauthorized(unittest.TestCase):
self.failUnless('401 Unauthorized' in result[0])
self.failUnless('&lt;hi!&gt;' in result[0])
self.assertEqual(L[0][0], '401 Unauthorized')
- self.assertEqual(L[0][1], [('Content-Length', len(result[0])),
+ self.assertEqual(L[0][1], [('Content-Length', str(len(result[0]))),
('Content-Type', 'text/html')])
def dummyapp(environ, start_response):