Commit ded2ee3e authored by Denis Bilenko's avatar Denis Bilenko

minor formatting fixes

parent 33268a8b
...@@ -509,13 +509,13 @@ class TestError_after_start_response(TestError): ...@@ -509,13 +509,13 @@ class TestError_after_start_response(TestError):
raise ExpectedException raise ExpectedException
class TestEmptyYield(TestCase): class TestEmptyYield(TestCase):
@staticmethod @staticmethod
def application(env, start_response): def application(env, start_response):
start_response('200 OK', [('Content-Type', 'text/plain')]) start_response('200 OK', [('Content-Type', 'text/plain')])
yield "" yield ""
yield "" yield ""
def test_err(self): def test_err(self):
fd = self.connect().makefile(bufsize=1) fd = self.connect().makefile(bufsize=1)
fd.write('GET / HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n') fd.write('GET / HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n')
...@@ -525,6 +525,7 @@ class TestEmptyYield(TestCase): ...@@ -525,6 +525,7 @@ class TestEmptyYield(TestCase):
garbage = fd.read() garbage = fd.read()
self.assert_(garbage=="", "got garbage: %r" % garbage) self.assert_(garbage=="", "got garbage: %r" % garbage)
class TestEmptyWrite(TestEmptyYield): class TestEmptyWrite(TestEmptyYield):
@staticmethod @staticmethod
def application(env, start_response): def application(env, start_response):
...@@ -533,6 +534,7 @@ class TestEmptyWrite(TestEmptyYield): ...@@ -533,6 +534,7 @@ class TestEmptyWrite(TestEmptyYield):
write("") write("")
return [] return []
class HTTPRequest(urllib2.Request): class HTTPRequest(urllib2.Request):
"""Hack urllib2.Request to support PUT and DELETE methods.""" """Hack urllib2.Request to support PUT and DELETE methods."""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment