Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/pagure/api/fork.py b/pagure/api/fork.py
- index deacf29c..24d563bb 100644
- --- a/pagure/api/fork.py
- +++ b/pagure/api/fork.py
- @@ -1279,45 +1279,45 @@ def api_pull_request_create(repo, username=None, namespace=None):
- Input
- ^^^^^
- - +-------------------------+----------+-------------+------------------------+
- - | Key | Type | Optionality | Description |
- - +=========================+==========+=============+========================+
- - | ``title`` | string | Mandatory | The title to give to |
- - | | | | this pull-request |
- - +-------------------------+----------+-------------+------------------------+
- - | ``branch_to`` | string | Mandatory | The name of the branch |
- - | | | | the submitted changes |
- - | | | | should be merged into. |
- - +-------------------------+----------+-------------+------------------------+
- - | ``branch_from`` | string | Mandatory | The name of the branch |
- - | | | | containing the changes |
- - | | | | to merge |
- - +-------------------------+----------+-------------+------------------------+
- - | ``repo_from`` | string | Optional | The name of the project|
- - | | | | the changes originate |
- - | | | | from. |
- - | | | | If not specified the |
- - | | | | repo_from is assumed |
- - | | | | to be the repo_to. |
- - +-------------------------+----------+-------------+------------------------+
- - | ``repo_from_username`` | string | Optional | The username of the |
- - | | | | project the changes |
- - | | | | originate from. |
- - | | | | If not specified the |
- - | | | | repo_from is assumed |
- - | | | | to be the repo_to. |
- - +-------------------------+----------+-------------+------------------------+
- - | ``repo_from_namespace`` | string | Optional | The namespace of the |
- - | | | | project the changes |
- - | | | | originate from. |
- - | | | | If not specified the |
- - | | | | repo_from is assumed |
- - | | | | to be the repo_to. |
- - +-------------------------+----------+-------------+------------------------+
- - | ``initial_comment`` | string | Optional | The intial comment |
- - | | | | describing what these |
- - | | | | changes are about. |
- - +-------------------------+----------+-------------+------------------------+
- + +-----------------------+----------+-------------+------------------------+
- + | Key | Type | Optionality | Description |
- + +=======================+==========+=============+========================+
- + | ``title`` | string | Mandatory | The title to give to |
- + | | | | this pull-request |
- + +-----------------------+----------+-------------+------------------------+
- + | ``branch_to`` | string | Mandatory | The name of the branch |
- + | | | | the submitted changes |
- + | | | | should be merged into. |
- + +-----------------------+----------+-------------+------------------------+
- + | ``branch_from`` | string | Mandatory | The name of the branch |
- + | | | | containing the changes |
- + | | | | to merge |
- + +-----------------------+----------+-------------+------------------------+
- + | ``repo_from`` | string | Optional | The name of the project|
- + | | | | the changes originate |
- + | | | | from. |
- + | | | | If not specified the |
- + | | | | repo_from is assumed |
- + | | | | to be the repo_to. |
- + +-----------------------+----------+-------------+------------------------+
- + | ``repo_from_username``| string | Optional | The username of the |
- + | | | | project the changes |
- + | | | | originate from. |
- + | | | | If not specified the |
- + | | | | repo_from is assumed |
- + | | | | to be the repo_to. |
- + +-----------------------+----------+-------------+------------------------+
- + |``repo_from_namespace``| string | Optional | The namespace of the |
- + | | | | project the changes |
- + | | | | originate from. |
- + | | | | If not specified the |
- + | | | | repo_from is assumed |
- + | | | | to be the repo_to. |
- + +-----------------------+----------+-------------+------------------------+
- + | ``initial_comment`` | string | Optional | The intial comment |
- + | | | | describing what these |
- + | | | | changes are about. |
- + +-----------------------+----------+-------------+------------------------+
- Sample response
- ^^^^^^^^^^^^^^^
- Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]? y
- @@ -1369,7 +1369,7 @@ def api_pull_request_create(repo, username=None, namespace=None):
- }
- }
- - """
- + """ # noqa
- repo_to = _get_repo(repo, username, namespace)
- Stage this hunk [y,n,q,a,d,K,g,/,e,?]? y
- diff --git a/tests/test_pagure_flask_api_fork.py b/tests/test_pagure_flask_api_fork.py
- index 8a601a3a..90c0cfc4 100644
- --- a/tests/test_pagure_flask_api_fork.py
- +++ b/tests/test_pagure_flask_api_fork.py
- @@ -2815,9 +2815,7 @@ class PagureFlaskApiForktests(tests.Modeltests):
- }
- output = self.app.post(
- - "/api/0/test/pull-request/new",
- - headers=headers,
- - data=data,
- + "/api/0/test/pull-request/new", headers=headers, data=data
- )
- self.assertEqual(output.status_code, 200)
- Stage this hunk [y,n,q,a,d,e,?]? y
- diff --git a/tests/test_pagure_flask_ui_repo.py b/tests/test_pagure_flask_ui_repo.py
- index 96965fce..31dcda65 100644
- --- a/tests/test_pagure_flask_ui_repo.py
- +++ b/tests/test_pagure_flask_ui_repo.py
- @@ -6757,9 +6757,7 @@ class PagureFlaskRepoTestHooktests(tests.Modeltests):
- """ Test the test_hook endpoint when the user is logged in. """
- user = tests.FakeUser(username="pingou")
- with tests.user_set(self.app.application, user):
- - data = {
- - "csrf_token": self.get_csrf()
- - }
- + data = {"csrf_token": self.get_csrf()}
- output = self.app.post("/test/settings/test_hook", data=data)
- self.assertEqual(output.status_code, 302)
- Stage this hunk [y,n,q,a,d,e,?]?
- y - stage this hunk
- n - do not stage this hunk
- q - quit; do not stage this hunk or any of the remaining ones
- a - stage this hunk and all later hunks in the file
- d - do not stage this hunk or any of the later hunks in the file
- e - manually edit the current hunk
- ? - print help
- @@ -6757,9 +6757,7 @@ class PagureFlaskRepoTestHooktests(tests.Modeltests):
- """ Test the test_hook endpoint when the user is logged in. """
- user = tests.FakeUser(username="pingou")
- with tests.user_set(self.app.application, user):
- - data = {
- - "csrf_token": self.get_csrf()
- - }
- + data = {"csrf_token": self.get_csrf()}
- output = self.app.post("/test/settings/test_hook", data=data)
- self.assertEqual(output.status_code, 302)
- Stage this hunk [y,n,q,a,d,e,?]? y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement