mirror of
https://github.com/kennethreitz/responder.git
synced 2026-06-05 23:00:17 +00:00
test for #71
This commit is contained in:
@@ -348,3 +348,14 @@ def test_mount_wsgi_app(api, flask, session):
|
||||
|
||||
r = session.get("http://;/flask")
|
||||
assert r.ok
|
||||
|
||||
|
||||
def test_async_class_based_views(api, session):
|
||||
@api.route("/")
|
||||
class Resource:
|
||||
async def on_post(self, req, resp):
|
||||
resp.text = await req.text
|
||||
|
||||
data = "frame"
|
||||
r = session.post(api.url_for(Resource), data=data)
|
||||
assert r.text == data
|
||||
|
||||
Reference in New Issue
Block a user