diff --git a/rhodecode/tests/models/test_pullrequest.py b/rhodecode/tests/models/test_pullrequest.py --- a/rhodecode/tests/models/test_pullrequest.py +++ b/rhodecode/tests/models/test_pullrequest.py @@ -25,7 +25,8 @@ import textwrap import rhodecode from rhodecode.lib.utils2 import safe_unicode from rhodecode.lib.vcs.backends import get_backend -from rhodecode.lib.vcs.backends.base import MergeResponse, MergeFailureReason +from rhodecode.lib.vcs.backends.base import ( + MergeResponse, MergeFailureReason, Reference) from rhodecode.lib.vcs.exceptions import RepositoryError from rhodecode.lib.vcs.nodes import FileNode from rhodecode.model.comment import ChangesetCommentsModel @@ -269,10 +270,10 @@ class TestPullRequestModel: def test_merge(self, pull_request, merge_extras): user = UserModel().get_by_username(TEST_USER_ADMIN_LOGIN) + merge_ref = Reference( + 'type', 'name', '6126b7bfcc82ad2d3deaee22af926b082ce54cc6') self.merge_mock.return_value = MergeResponse( - True, True, - '6126b7bfcc82ad2d3deaee22af926b082ce54cc6', - MergeFailureReason.NONE) + True, True, merge_ref, MergeFailureReason.NONE) merge_extras['repository'] = pull_request.target_repo.repo_name PullRequestModel().merge( @@ -308,10 +309,10 @@ class TestPullRequestModel: def test_merge_failed(self, pull_request, merge_extras): user = UserModel().get_by_username(TEST_USER_ADMIN_LOGIN) + merge_ref = Reference( + 'type', 'name', '6126b7bfcc82ad2d3deaee22af926b082ce54cc6') self.merge_mock.return_value = MergeResponse( - False, False, - '6126b7bfcc82ad2d3deaee22af926b082ce54cc6', - MergeFailureReason.MERGE_FAILED) + False, False, merge_ref, MergeFailureReason.MERGE_FAILED) merge_extras['repository'] = pull_request.target_repo.repo_name PullRequestModel().merge(