Beispiel #1
0
 def test_check_auto_mergable_should_be_async_to_speed_up_page_response(self):  # noqa
     orig, fork = self.create_project_and_a_fork()
     res = self.create_an_auto_mergable_pull_request(fork)
     pull_url = res.request.path
     app = TestApp(extra_environ={'REMOTE_USER': str(orig.owner_id)})
     res = app.get(pull_url)
     assert not PullRequest.is_auto_mergable.mock.called
Beispiel #2
0
 def create_an_auto_mergable_pull_request(self, from_proj):
     app = TestApp(extra_environ={'REMOTE_USER': str(from_proj.owner_id)})
     res = app.get('/%s' % str(from_proj.name))
     res = res.click("Pull Request")
     form = res.forms[1]
     form['body'] = "test"
     res = form.submit()
     while 300 < res.status_int < 400:
         res = res.follow()
     return res