changeset 6071:32b674ab4878

routing: drop unused PUT handlers
author Mads Kiilerich <madski@unity3d.com>
date Thu, 04 Aug 2016 14:23:36 +0200
parents 4ebce2642888
children 8805d3e688eb
files kallithea/config/routing.py kallithea/controllers/admin/gists.py kallithea/tests/functional/test_admin_gists.py kallithea/tests/functional/test_repo_groups.py
diffstat 4 files changed, 0 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/config/routing.py	Thu Aug 04 14:23:36 2016 +0200
+++ b/kallithea/config/routing.py	Thu Aug 04 14:23:36 2016 +0200
@@ -147,16 +147,10 @@
         m.connect("edit_repo_group", "/repo_groups/{group_name:.*?}/edit",
                   action="edit",
                   conditions=dict(method=["GET"], function=check_group))
-        m.connect("edit_repo_group", "/repo_groups/{group_name:.*?}/edit",
-                  action="edit",
-                  conditions=dict(method=["PUT"], function=check_group))
 
         m.connect("edit_repo_group_advanced", "/repo_groups/{group_name:.*?}/edit/advanced",
                   action="edit_repo_group_advanced",
                   conditions=dict(method=["GET"], function=check_group))
-        m.connect("edit_repo_group_advanced", "/repo_groups/{group_name:.*?}/edit/advanced",
-                  action="edit_repo_group_advanced",
-                  conditions=dict(method=["PUT"], function=check_group))
 
         m.connect("edit_repo_group_perms", "/repo_groups/{group_name:.*?}/edit/permissions",
                   action="edit_repo_group_perms",
@@ -194,8 +188,6 @@
         #EXTRAS USER ROUTES
         m.connect("edit_user_advanced", "/users/{id}/edit/advanced",
                   action="edit_advanced", conditions=dict(method=["GET"]))
-        m.connect("edit_user_advanced", "/users/{id}/edit/advanced",
-                  action="update_advanced", conditions=dict(method=["PUT"]))
 
         m.connect("edit_user_api_keys", "/users/{id}/edit/api_keys",
                   action="edit_api_keys", conditions=dict(method=["GET"]))
@@ -402,8 +394,6 @@
 
 
         m.connect("/gists/{gist_id}",
-                  action="update", conditions=dict(method=["PUT"]))
-        m.connect("/gists/{gist_id}",
                   action="delete", conditions=dict(method=["DELETE"]))
         m.connect("edit_gist", "/gists/{gist_id}/edit",
                   action="edit", conditions=dict(method=["GET", "POST"]))
--- a/kallithea/controllers/admin/gists.py	Thu Aug 04 14:23:36 2016 +0200
+++ b/kallithea/controllers/admin/gists.py	Thu Aug 04 14:23:36 2016 +0200
@@ -150,17 +150,6 @@
 
     @LoginRequired()
     @NotAnonymous()
-    def update(self, gist_id):
-        """PUT /admin/gists/gist_id: Update an existing item"""
-        # Forms posted to this method should contain a hidden field:
-        #    <input type="hidden" name="_method" value="PUT" />
-        # Or using helpers:
-        #    h.form(url('gist', gist_id=ID),
-        #           method='put')
-        # url('gist', gist_id=ID)
-
-    @LoginRequired()
-    @NotAnonymous()
     def delete(self, gist_id):
         gist = GistModel().get_gist(gist_id)
         owner = gist.gist_owner == c.authuser.user_id
--- a/kallithea/tests/functional/test_admin_gists.py	Thu Aug 04 14:23:36 2016 +0200
+++ b/kallithea/tests/functional/test_admin_gists.py	Thu Aug 04 14:23:36 2016 +0200
@@ -129,10 +129,6 @@
         self.log_user()
         response = self.app.get(url('new_gist'))
 
-    # Functionality currently not implemented
-    #def test_update(self):
-    #    response = self.app.put(url('gist', gist_id=1))
-
     def test_delete(self):
         self.log_user()
         gist = _create_gist('delete-me')
--- a/kallithea/tests/functional/test_repo_groups.py	Thu Aug 04 14:23:36 2016 +0200
+++ b/kallithea/tests/functional/test_repo_groups.py	Thu Aug 04 14:23:36 2016 +0200
@@ -8,9 +8,6 @@
         response = self.app.get(url('repos_groups'))
         response.mustcontain('{"totalRecords": 0, "sort": null, "startIndex": 0, "dir": "asc", "records": []};')
 
-#    def test_create(self):
-#        response = self.app.post(url('repos_groups'))
-
     def test_new(self):
         self.log_user()
         response = self.app.get(url('new_repos_group'))
@@ -18,16 +15,3 @@
     def test_new_by_regular_user(self):
         self.log_user(TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR_PASS)
         response = self.app.get(url('new_repos_group'), status=403)
-#
-#    def test_update(self):
-#        response = self.app.put(url('repos_group', group_name=1))
-#
-#    def test_delete(self):
-#        self.log_user()
-#        response = self.app.delete(url('repos_group', group_name=1))
-#
-#    def test_show(self):
-#        response = self.app.get(url('repos_group', group_name=1))
-#
-#    def test_edit(self):
-#        response = self.app.get(url('edit_repo_group', group_name=1))