api: add get_method API call.
- in addition use it's mechanics to propose users other methods if the calling method is not found.
This commit is contained in:
parent
a2de6540c6
commit
6568814f98
4 changed files with 171 additions and 5 deletions
|
|
@ -80,7 +80,13 @@ class TestApi(object):
|
|||
def test_api_non_existing_method(self, request):
|
||||
id_, params = build_data(self.apikey, 'not_existing', args='xx')
|
||||
response = api_call(self.app, params)
|
||||
expected = 'No such method: not_existing'
|
||||
expected = 'No such method: not_existing. Similar methods: none'
|
||||
assert_error(id_, expected, given=response.body)
|
||||
|
||||
def test_api_non_existing_method_have_similar(self, request):
|
||||
id_, params = build_data(self.apikey, 'comment', args='xx')
|
||||
response = api_call(self.app, params)
|
||||
expected = 'No such method: comment. Similar methods: changeset_comment, comment_pull_request, comment_commit'
|
||||
assert_error(id_, expected, given=response.body)
|
||||
|
||||
def test_api_disabled_user(self, request):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue