Commit 7681268f authored by Denis Bilenko's avatar Denis Bilenko

wsgi_test.py: add tests for applications that yield

parent e56b9eb3
......@@ -48,6 +48,15 @@ def hello_world(env, start_response):
return ["hello world"]
def hello_world_yield(env, start_response):
if env['PATH_INFO'] == 'notexist':
start_response('404 Not Found', [('Content-type', 'text/plain')])
yield "not found"
else:
start_response('200 OK', [('Content-type', 'text/plain')])
yield "hello world"
def chunked_app(env, start_response):
start_response('200 OK', [('Content-type', 'text/plain')])
yield "this"
......@@ -242,6 +251,11 @@ class TestHttpdBasic(TestCase):
fd.close()
class TestYield(TestHttpdBasic):
application = staticmethod(hello_world_yield)
class TestGetArg(TestCase):
def application(self, env, start_response):
......
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