Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @patch('pagure.lib.notify.send_email', MagicMock(return_value=True))
- def test_api_pull_request_open_from_branch_to_origin(self):
- """Test the api_pull_request_create method from a fork to a master,
- with project token of a origin with all the acls"""
- tests.setup_for_my_function(self.session)
- tests.add_readme_git_repo(os.path.join(self.path, 'repos', 'fork',
- 'pingou', 'vegetable.git'))
- tests.add_commit_git_repo(os.path.join(self.path, 'repos', 'fork',
- 'pingou', 'vegetable.git'), branch='branch')
- tests.create_tokens_acl(self.session, token_id='iamparenttoken')
- tests.create_tokens_acl(self.session, token_id='iamforktoken')
- headers = {'Authorization': 'token iamforktoken'}
- data = {
- 'title': 'war of tomatoes',
- 'repo': 'vegetable',
- 'initial_comment': 'the manifest',
- 'branch_to': 'master',
- 'branch_from': 'branch',
- }
- output = self.app.post('/api/0/vegetable/pull-request/new', headers=headers)
- self.assertEqual(output.status_code, 200)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement