diff --git a/runbot_merge/tests/fake_github/__init__.py b/runbot_merge/tests/fake_github/__init__.py index 5ff1b331..fa78a1b6 100644 --- a/runbot_merge/tests/fake_github/__init__.py +++ b/runbot_merge/tests/fake_github/__init__.py @@ -575,16 +575,16 @@ class Client(werkzeug.test.Client): def pull_request_review(self, action, pr, user, body): """ - :type action: 'APPROVED' | 'REQUEST_CHANGES' | 'COMMENT' + :type action: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' :type pr: PR :type user: str :type body: str """ - assert action in ('APPROVED', 'REQUEST_CHANGES', 'COMMENT') + assert action in ('APPROVE', 'REQUEST_CHANGES', 'COMMENT') return self.open(self._make_env( 'pull_request_review', { 'review': { - 'state': action, + 'state': 'APPROVED' if action == 'APPROVE' else action, 'body': body, 'user': {'login': user}, }, diff --git a/runbot_merge/tests/test_basic.py b/runbot_merge/tests/test_basic.py index 98d039f6..4e1a99b9 100644 --- a/runbot_merge/tests/test_basic.py +++ b/runbot_merge/tests/test_basic.py @@ -1153,6 +1153,6 @@ class TestReviewing(object): assert pr.priority == 1 assert pr.state == 'opened' - prx.post_review('APPROVED', 'reviewer', "hansen priority=2") + prx.post_review('APPROVE', 'reviewer', "hansen priority=2") assert pr.priority == 2 assert pr.state == 'approved'