api: pull-requests, make the repoid parameter optional. Because pullrequestid is global

we don't want to complicate things more by requiring repoid. Left for backward compat.
This commit is contained in:
Marcin Kuzminski 2017-11-23 21:14:04 +01:00
parent b809d00f88
commit bc23ad316c
8 changed files with 72 additions and 39 deletions

View file

@ -170,10 +170,11 @@ class TestCommentPullRequest(object):
assert_error(id_, expected, given=response.body)
@pytest.mark.backends("git", "hg")
def test_api_comment_pull_request_repo_error(self):
def test_api_comment_pull_request_repo_error(self, pr_util):
pull_request = pr_util.create_pull_request()
id_, params = build_data(
self.apikey, 'comment_pull_request',
repoid=666, pullrequestid=1)
repoid=666, pullrequestid=pull_request.pull_request_id)
response = api_call(self.app, params)
expected = 'repository `666` does not exist'