##// END OF EJS Templates
tests: Adapt tests to return value change.
Martin Bornhold -
r1077:b67a4d33 default
parent child Browse files
Show More
@@ -659,9 +659,9 b' def update_pull_request('
659 commit_changes = {"added": [], "common": [], "removed": []}
659 commit_changes = {"added": [], "common": [], "removed": []}
660 if str2bool(Optional.extract(update_commits)):
660 if str2bool(Optional.extract(update_commits)):
661 if PullRequestModel().has_valid_update_type(pull_request):
661 if PullRequestModel().has_valid_update_type(pull_request):
662 _version, _commit_changes = PullRequestModel().update_commits(
662 update_response = PullRequestModel().update_commits(
663 pull_request)
663 pull_request)
664 commit_changes = _commit_changes or commit_changes
664 commit_changes = update_response.changes or commit_changes
665 Session().commit()
665 Session().commit()
666
666
667 reviewers_changes = {"added": [], "removed": []}
667 reviewers_changes = {"added": [], "removed": []}
@@ -687,5 +687,5 b' def update_pull_request('
687 'updated_commits': commit_changes,
687 'updated_commits': commit_changes,
688 'updated_reviewers': reviewers_changes
688 'updated_reviewers': reviewers_changes
689 }
689 }
690
690 return data
691 return data
691
@@ -80,7 +80,7 b' def test_pull_request_stays_if_update_wi'
80 voted_status, *pull_request.reviewers)
80 voted_status, *pull_request.reviewers)
81
81
82 # Update, without change
82 # Update, without change
83 version, changes = PullRequestModel().update_commits(pull_request)
83 PullRequestModel().update_commits(pull_request)
84
84
85 # Expect that review status is the voted_status
85 # Expect that review status is the voted_status
86 expected_review_status = voted_status
86 expected_review_status = voted_status
@@ -99,7 +99,7 b' def test_pull_request_under_review_if_up'
99
99
100 # Update, with change
100 # Update, with change
101 pr_util.update_source_repository()
101 pr_util.update_source_repository()
102 version, changes = PullRequestModel().update_commits(pull_request)
102 PullRequestModel().update_commits(pull_request)
103
103
104 # Expect that review status is the voted_status
104 # Expect that review status is the voted_status
105 expected_review_status = db.ChangesetStatus.STATUS_UNDER_REVIEW
105 expected_review_status = db.ChangesetStatus.STATUS_UNDER_REVIEW
General Comments 0
You need to be logged in to leave comments. Login now