Show More
@@ -25,7 +25,8 b' import textwrap' | |||
|
25 | 25 | import rhodecode |
|
26 | 26 | from rhodecode.lib.utils2 import safe_unicode |
|
27 | 27 | from rhodecode.lib.vcs.backends import get_backend |
|
28 |
from rhodecode.lib.vcs.backends.base import |
|
|
28 | from rhodecode.lib.vcs.backends.base import ( | |
|
29 | MergeResponse, MergeFailureReason, Reference) | |
|
29 | 30 | from rhodecode.lib.vcs.exceptions import RepositoryError |
|
30 | 31 | from rhodecode.lib.vcs.nodes import FileNode |
|
31 | 32 | from rhodecode.model.comment import ChangesetCommentsModel |
@@ -269,10 +270,10 b' class TestPullRequestModel:' | |||
|
269 | 270 | |
|
270 | 271 | def test_merge(self, pull_request, merge_extras): |
|
271 | 272 | user = UserModel().get_by_username(TEST_USER_ADMIN_LOGIN) |
|
273 | merge_ref = Reference( | |
|
274 | 'type', 'name', '6126b7bfcc82ad2d3deaee22af926b082ce54cc6') | |
|
272 | 275 | self.merge_mock.return_value = MergeResponse( |
|
273 | True, True, | |
|
274 | '6126b7bfcc82ad2d3deaee22af926b082ce54cc6', | |
|
275 | MergeFailureReason.NONE) | |
|
276 | True, True, merge_ref, MergeFailureReason.NONE) | |
|
276 | 277 | |
|
277 | 278 | merge_extras['repository'] = pull_request.target_repo.repo_name |
|
278 | 279 | PullRequestModel().merge( |
@@ -308,10 +309,10 b' class TestPullRequestModel:' | |||
|
308 | 309 | |
|
309 | 310 | def test_merge_failed(self, pull_request, merge_extras): |
|
310 | 311 | user = UserModel().get_by_username(TEST_USER_ADMIN_LOGIN) |
|
312 | merge_ref = Reference( | |
|
313 | 'type', 'name', '6126b7bfcc82ad2d3deaee22af926b082ce54cc6') | |
|
311 | 314 | self.merge_mock.return_value = MergeResponse( |
|
312 | False, False, | |
|
313 | '6126b7bfcc82ad2d3deaee22af926b082ce54cc6', | |
|
314 | MergeFailureReason.MERGE_FAILED) | |
|
315 | False, False, merge_ref, MergeFailureReason.MERGE_FAILED) | |
|
315 | 316 | |
|
316 | 317 | merge_extras['repository'] = pull_request.target_repo.repo_name |
|
317 | 318 | PullRequestModel().merge( |
General Comments 0
You need to be logged in to leave comments.
Login now