changeset 6263:358f9a456a43

pullrequests: it is not possible to specify reviewers while creating a PR - drop some internal traces of that
author Mads Kiilerich <madski@unity3d.com>
date Mon, 24 Oct 2016 15:18:51 +0200
parents 2c8c1a604154
children 93a56b5264d3
files kallithea/controllers/pullrequests.py kallithea/model/forms.py kallithea/tests/functional/test_pullrequests.py
diffstat 3 files changed, 1 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/pullrequests.py	Sat Oct 22 19:47:16 2016 +0200
+++ b/kallithea/controllers/pullrequests.py	Mon Oct 24 15:18:51 2016 +0200
@@ -356,7 +356,7 @@
         # requested destination and have the exact ancestor
         other_ref = '%s:%s:%s' % (other_ref_type, other_ref_name, ancestor_rev)
 
-        reviewers = _form['review_members']
+        reviewers = []
 
         title = _form['pullrequest_title']
         if not title:
--- a/kallithea/model/forms.py	Sat Oct 22 19:47:16 2016 +0200
+++ b/kallithea/model/forms.py	Mon Oct 24 15:18:51 2016 +0200
@@ -524,7 +524,6 @@
         org_ref = v.UnicodeString(strip=True, required=True)
         other_repo = v.UnicodeString(strip=True, required=True)
         other_ref = v.UnicodeString(strip=True, required=True)
-        review_members = v.Set()
 
         pullrequest_title = v.UnicodeString(strip=True, required=True)
         pullrequest_desc = v.UnicodeString(strip=True, required=False)
--- a/kallithea/tests/functional/test_pullrequests.py	Sat Oct 22 19:47:16 2016 +0200
+++ b/kallithea/tests/functional/test_pullrequests.py	Mon Oct 24 15:18:51 2016 +0200
@@ -33,43 +33,6 @@
         assert response.status == '200 OK'
         response.mustcontain('This pull request has already been merged to default.')
 
-    def test_create_with_existing_reviewer(self):
-        self.log_user()
-        response = self.app.post(url(controller='pullrequests', action='create',
-                                     repo_name=HG_REPO),
-                                 {'org_repo': HG_REPO,
-                                  'org_ref': 'branch:default:default',
-                                  'other_repo': HG_REPO,
-                                  'other_ref': 'branch:default:default',
-                                  'pullrequest_title': 'title',
-                                  'pullrequest_desc': 'description',
-                                  '_authentication_token': self.authentication_token(),
-                                  'review_members': TEST_USER_ADMIN_LOGIN,
-                                 }
-                                )
-        assert response.status == '302 Found'
-        response = response.follow()
-        assert response.status == '200 OK'
-        response.mustcontain('This pull request has already been merged to default.')
-
-    def test_create_with_invalid_reviewer(self):
-        invalid_user_name = 'invalid_user'
-        self.log_user()
-        response = self.app.post(url(controller='pullrequests', action='create',
-                                     repo_name=HG_REPO),
-                                 {
-                                  'org_repo': HG_REPO,
-                                  'org_ref': 'branch:default:default',
-                                  'other_repo': HG_REPO,
-                                  'other_ref': 'branch:default:default',
-                                  'pullrequest_title': 'title',
-                                  'pullrequest_desc': 'description',
-                                  '_authentication_token': self.authentication_token(),
-                                  'review_members': invalid_user_name,
-                                 },
-                                 status=400)
-        response.mustcontain('Invalid reviewer &#34;%s&#34; specified' % invalid_user_name)
-
     def test_update_with_invalid_reviewer(self):
         invalid_user_id = 99999
         self.log_user()