Uploaded Test files
This commit is contained in:
parent
f584ad9d97
commit
2e81cb7d99
16627 changed files with 2065359 additions and 102444 deletions
20
venv/Lib/site-packages/tornado/test/wsgi_test.py
Normal file
20
venv/Lib/site-packages/tornado/test/wsgi_test.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
from wsgiref.validate import validator
|
||||
|
||||
from tornado.testing import AsyncHTTPTestCase
|
||||
from tornado.wsgi import WSGIContainer
|
||||
|
||||
|
||||
class WSGIContainerTest(AsyncHTTPTestCase):
|
||||
# TODO: Now that WSGIAdapter is gone, this is a pretty weak test.
|
||||
def wsgi_app(self, environ, start_response):
|
||||
status = "200 OK"
|
||||
response_headers = [("Content-Type", "text/plain")]
|
||||
start_response(status, response_headers)
|
||||
return [b"Hello world!"]
|
||||
|
||||
def get_app(self):
|
||||
return WSGIContainer(validator(self.wsgi_app))
|
||||
|
||||
def test_simple(self):
|
||||
response = self.fetch("/")
|
||||
self.assertEqual(response.body, b"Hello world!")
|
Loading…
Add table
Add a link
Reference in a new issue