Advertisement
lenkaseg

Untitled

May 6th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 9.09 KB | None | 0 0
  1. diff --git a/pagure/api/fork.py b/pagure/api/fork.py
  2. index deacf29c..24d563bb 100644
  3. --- a/pagure/api/fork.py
  4. +++ b/pagure/api/fork.py
  5. @@ -1279,45 +1279,45 @@ def api_pull_request_create(repo, username=None, namespace=None):
  6.      Input
  7.      ^^^^^
  8.  
  9. -    +-------------------------+----------+-------------+------------------------+
  10. -    | Key                     | Type     | Optionality | Description            |
  11. -    +=========================+==========+=============+========================+
  12. -    | ``title``               | string   | Mandatory   | The title to give to   |
  13. -    |                         |          |             | this pull-request      |
  14. -    +-------------------------+----------+-------------+------------------------+
  15. -    | ``branch_to``           | string   | Mandatory   | The name of the branch |
  16. -    |                         |          |             | the submitted changes  |
  17. -    |                         |          |             | should be merged into. |
  18. -    +-------------------------+----------+-------------+------------------------+
  19. -    | ``branch_from``         | string   | Mandatory   | The name of the branch |
  20. -    |                         |          |             | containing the changes |
  21. -    |                         |          |             | to merge               |
  22. -    +-------------------------+----------+-------------+------------------------+
  23. -    | ``repo_from``           | string   | Optional    | The name of the project|
  24. -    |                         |          |             | the changes originate  |
  25. -    |                         |          |             | from.                  |
  26. -    |                         |          |             | If not specified the   |
  27. -    |                         |          |             | repo_from is assumed   |
  28. -    |                         |          |             | to be the repo_to.     |
  29. -    +-------------------------+----------+-------------+------------------------+
  30. -    | ``repo_from_username``  | string   | Optional    | The username of the    |
  31. -    |                         |          |             | project the changes    |
  32. -    |                         |          |             | originate from.        |
  33. -    |                         |          |             | If not specified the   |
  34. -    |                         |          |             | repo_from is assumed   |
  35. -    |                         |          |             | to be the repo_to.     |
  36. -    +-------------------------+----------+-------------+------------------------+
  37. -    | ``repo_from_namespace`` | string   | Optional    | The namespace of the   |
  38. -    |                         |          |             | project the changes    |
  39. -    |                         |          |             | originate from.        |
  40. -    |                         |          |             | If not specified the   |
  41. -    |                         |          |             | repo_from is assumed   |
  42. -    |                         |          |             | to be the repo_to.     |
  43. -    +-------------------------+----------+-------------+------------------------+
  44. -    | ``initial_comment``     | string   | Optional    | The intial comment     |
  45. -    |                         |          |             | describing what these  |
  46. -    |                         |          |             | changes are about.     |
  47. -    +-------------------------+----------+-------------+------------------------+
  48. +    +-----------------------+----------+-------------+------------------------+
  49. +    | Key                   | Type     | Optionality | Description            |
  50. +    +=======================+==========+=============+========================+
  51. +    | ``title``             | string   | Mandatory   | The title to give to   |
  52. +    |                       |          |             | this pull-request      |
  53. +    +-----------------------+----------+-------------+------------------------+
  54. +    | ``branch_to``         | string   | Mandatory   | The name of the branch |
  55. +    |                       |          |             | the submitted changes  |
  56. +    |                       |          |             | should be merged into. |
  57. +    +-----------------------+----------+-------------+------------------------+
  58. +    | ``branch_from``       | string   | Mandatory   | The name of the branch |
  59. +    |                       |          |             | containing the changes |
  60. +    |                       |          |             | to merge               |
  61. +    +-----------------------+----------+-------------+------------------------+
  62. +    | ``repo_from``         | string   | Optional    | The name of the project|
  63. +    |                       |          |             | the changes originate  |
  64. +    |                       |          |             | from.                  |
  65. +    |                       |          |             | If not specified the   |
  66. +    |                       |          |             | repo_from is assumed   |
  67. +    |                       |          |             | to be the repo_to.     |
  68. +    +-----------------------+----------+-------------+------------------------+
  69. +    | ``repo_from_username``| string   | Optional    | The username of the    |
  70. +    |                       |          |             | project the changes    |
  71. +    |                       |          |             | originate from.        |
  72. +    |                       |          |             | If not specified the   |
  73. +    |                       |          |             | repo_from is assumed   |
  74. +    |                       |          |             | to be the repo_to.     |
  75. +    +-----------------------+----------+-------------+------------------------+
  76. +    |``repo_from_namespace``| string   | Optional    | The namespace of the   |
  77. +    |                       |          |             | project the changes    |
  78. +    |                       |          |             | originate from.        |
  79. +    |                       |          |             | If not specified the   |
  80. +    |                       |          |             | repo_from is assumed   |
  81. +    |                       |          |             | to be the repo_to.     |
  82. +    +-----------------------+----------+-------------+------------------------+
  83. +    | ``initial_comment``   | string   | Optional    | The intial comment     |
  84. +    |                       |          |             | describing what these  |
  85. +    |                       |          |             | changes are about.     |
  86. +    +-----------------------+----------+-------------+------------------------+
  87.  
  88.      Sample response
  89.      ^^^^^^^^^^^^^^^
  90. Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]? y
  91. @@ -1369,7 +1369,7 @@ def api_pull_request_create(repo, username=None, namespace=None):
  92.            }
  93.          }
  94.  
  95. -    """
  96. +    """ # noqa
  97.  
  98.      repo_to = _get_repo(repo, username, namespace)
  99.  
  100. Stage this hunk [y,n,q,a,d,K,g,/,e,?]? y
  101.  
  102. diff --git a/tests/test_pagure_flask_api_fork.py b/tests/test_pagure_flask_api_fork.py
  103. index 8a601a3a..90c0cfc4 100644
  104. --- a/tests/test_pagure_flask_api_fork.py
  105. +++ b/tests/test_pagure_flask_api_fork.py
  106. @@ -2815,9 +2815,7 @@ class PagureFlaskApiForktests(tests.Modeltests):
  107.          }
  108.  
  109.          output = self.app.post(
  110. -            "/api/0/test/pull-request/new",
  111. -            headers=headers,
  112. -            data=data,
  113. +            "/api/0/test/pull-request/new", headers=headers, data=data
  114.          )
  115.          self.assertEqual(output.status_code, 200)
  116.  
  117. Stage this hunk [y,n,q,a,d,e,?]? y
  118.  
  119. diff --git a/tests/test_pagure_flask_ui_repo.py b/tests/test_pagure_flask_ui_repo.py
  120. index 96965fce..31dcda65 100644
  121. --- a/tests/test_pagure_flask_ui_repo.py
  122. +++ b/tests/test_pagure_flask_ui_repo.py
  123. @@ -6757,9 +6757,7 @@ class PagureFlaskRepoTestHooktests(tests.Modeltests):
  124.          """ Test the test_hook endpoint when the user is logged in. """
  125.          user = tests.FakeUser(username="pingou")
  126.          with tests.user_set(self.app.application, user):
  127. -            data = {
  128. -                "csrf_token": self.get_csrf()
  129. -            }
  130. +            data = {"csrf_token": self.get_csrf()}
  131.              output = self.app.post("/test/settings/test_hook", data=data)
  132.              self.assertEqual(output.status_code, 302)
  133.  
  134. Stage this hunk [y,n,q,a,d,e,?]?
  135. y - stage this hunk
  136. n - do not stage this hunk
  137. q - quit; do not stage this hunk or any of the remaining ones
  138. a - stage this hunk and all later hunks in the file
  139. d - do not stage this hunk or any of the later hunks in the file
  140. e - manually edit the current hunk
  141. ? - print help
  142. @@ -6757,9 +6757,7 @@ class PagureFlaskRepoTestHooktests(tests.Modeltests):
  143.          """ Test the test_hook endpoint when the user is logged in. """
  144.          user = tests.FakeUser(username="pingou")
  145.          with tests.user_set(self.app.application, user):
  146. -            data = {
  147. -                "csrf_token": self.get_csrf()
  148. -            }
  149. +            data = {"csrf_token": self.get_csrf()}
  150.              output = self.app.post("/test/settings/test_hook", data=data)
  151.              self.assertEqual(output.status_code, 302)
  152.  
  153. Stage this hunk [y,n,q,a,d,e,?]? y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement