Skip to content
Snippets Groups Projects
Commit 84e69ea6 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

fix tests after changes introduced in ad6da692

parent 4a60e533
No related branches found
No related tags found
No related merge requests found
......@@ -183,7 +183,7 @@ class route(object): # noqa: N801
data['urls'] = [url for url in endpoint_list if
self.filter_api_url(url, route_re, data['noargs'])]
if 'args' in data:
if data['args']:
data['examples'] = self.build_examples(data['urls'], data['args'])
data['heading'] = '%s Documentation' % data['route']
......
......@@ -55,7 +55,7 @@ class APIUrls(object):
for param in url_rule_params:
param_name = re.findall('<(.*)>', param)
param_name = param_name[0] if len(param_name) > 0 else None
if param_name and hasattr(f, 'doc_data') and 'args' in f.doc_data: # noqa
if param_name and hasattr(f, 'doc_data') and f.doc_data['args']: # noqa
param_index = \
next(i for (i, d) in enumerate(f.doc_data['args'])
if d['name'] == param_name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment