Commit 39bb0bdf authored by Goran Pavlovic's avatar Goran Pavlovic
Browse files

Class based view method rollback, changed register class based view test

parent 193a28de
......@@ -41,9 +41,8 @@ def _extract_swagger_docs(end_point_doc, method="get"):
def _build_doc_from_func_doc(route):
out = {}
is_method_allowed = route.method == METH_ANY or route.method in METH_ALL
if isclass(route.handler) and issubclass(route.handler, web.View) and is_method_allowed:
if isclass(route.handler) and issubclass(route.handler, web.View) and route.method == METH_ANY:
method_names = {
attr for attr in dir(route.handler)
if attr.upper() in METH_ALL
......
......@@ -262,7 +262,7 @@ def test_wrong_method(test_client, loop):
@asyncio.coroutine
def test_class_view(test_client, loop):
app = web.Application(loop=loop)
app.router.add_route('*', "/class_view", ClassView)
app.router.add_view("/class_view", ClassView)
setup_swagger(app)
client = yield from test_client(app)
......
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