Skip to content

Commit

Permalink
py3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonc committed Dec 28, 2011
1 parent f6010a8 commit 08bc0ff
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions waitress/tests/test_task.py
Expand Up @@ -142,7 +142,7 @@ def app(environ, start_response):

def test_execute_app_calls_start_response_w_exc_info_complete(self):
def app(environ, start_response):
start_response('200 OK', [], [ValueError, None, None])
start_response('200 OK', [], [ValueError, ValueError(), None])
inst = self._makeOne()
inst.complete = True
inst.channel.server.application = app
Expand Down Expand Up @@ -565,14 +565,14 @@ def test_execute(self):
inst.execute()
lines = filter_lines(inst.channel.written)
self.assertEqual(len(lines), 8)
self.assertEqual(lines[0], 'HTTP/1.0 432 Too Ugly')
self.assertEqual(lines[1], 'Connection: close')
self.assertEqual(lines[2], 'Content-Length: 45')
self.assertEqual(lines[3], 'Content-Type: text/plain')
self.assertEqual(lines[0], b'HTTP/1.0 432 Too Ugly')
self.assertEqual(lines[1], b'Connection: close')
self.assertEqual(lines[2], b'Content-Length: 45')
self.assertEqual(lines[3], b'Content-Type: text/plain')
self.assertTrue(lines[4])
self.assertEqual(lines[5], 'Server: waitress')
self.assertEqual(lines[6], 'Too Ugly (1 bytes)')
self.assertEqual(lines[7], '(generated by waitress)')
self.assertEqual(lines[5], b'Server: waitress')
self.assertEqual(lines[6], b'Too Ugly (1 bytes)')
self.assertEqual(lines[7], b'(generated by waitress)')

class DummyError(object):
code = '432'
Expand Down

0 comments on commit 08bc0ff

Please sign in to comment.