# HG changeset patch # User Mads Kiilerich # Date 1470313416 -7200 # Node ID 32b674ab487882d1b1dff733ad4befb7161ce897 # Parent 4ebce2642888b756a74e80f0ca160e66d2c3d5f9 routing: drop unused PUT handlers diff -r 4ebce2642888 -r 32b674ab4878 kallithea/config/routing.py --- 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"])) diff -r 4ebce2642888 -r 32b674ab4878 kallithea/controllers/admin/gists.py --- 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: - # - # 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 diff -r 4ebce2642888 -r 32b674ab4878 kallithea/tests/functional/test_admin_gists.py --- 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') diff -r 4ebce2642888 -r 32b674ab4878 kallithea/tests/functional/test_repo_groups.py --- 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))