diff --git a/tests/test_tornadoparser.py b/tests/test_tornadoparser.py index 4e2b2e14..ea206ab8 100644 --- a/tests/test_tornadoparser.py +++ b/tests/test_tornadoparser.py @@ -8,8 +8,8 @@ import tornado.httpserver import tornado.httputil import tornado.ioloop +import tornado.testing import tornado.web -from tornado.testing import AsyncHTTPTestCase from webargs import fields, missing from webargs.core import json, parse_json @@ -20,6 +20,22 @@ use_kwargs, ) + +class BaseAsyncTestCase(tornado.testing.AsyncHTTPTestCase): + # this isn't a real test case itself + __test__ = False + + # Workaround for https://github.com/pytest-dev/pytest/issues/12263. + # + # this was suggested by one of the pytest maintainers while a patch + # for Tornado is pending + # + # we may need it even after the patch, since we want to support testing on + # older Tornado versions until we drop support for them + def runTest(self): + pass + + name = "name" value = "value" @@ -460,7 +476,7 @@ def get(self, id, args): ) -class TestApp(AsyncHTTPTestCase): +class TestApp(BaseAsyncTestCase): def get_app(self): return echo_app @@ -528,7 +544,7 @@ def post(self, args): ) -class TestValidateApp(AsyncHTTPTestCase): +class TestValidateApp(BaseAsyncTestCase): def get_app(self): return validate_app