Mercurial > kallithea
changeset 6072:8805d3e688eb
defaults: remove stub controllers
Remove empty controllers that seem to be left over from experiments with the
automatic 'routes' routing for 'resource'.
Also, remove test coverage of this. The tests didn't even test the empty
controllers and have been broken for a while.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 04 Aug 2016 14:23:36 +0200 |
parents | 32b674ab4878 |
children | 1fdff0d0516c |
files | kallithea/controllers/admin/defaults.py kallithea/tests/functional/test_admin_defaults.py |
diffstat | 2 files changed, 0 insertions(+), 60 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/admin/defaults.py Thu Aug 04 14:23:36 2016 +0200 +++ b/kallithea/controllers/admin/defaults.py Thu Aug 04 14:23:36 2016 +0200 @@ -69,14 +69,6 @@ force_defaults=False ) - def create(self): - """POST /defaults: Create a new item""" - # url('defaults') - - def new(self, format='html'): - """GET /defaults/new: Form to create a new item""" - # url('new_default') - def update(self, id): """PUT /defaults/id: Update an existing item""" # Forms posted to this method should contain a hidden field: @@ -113,20 +105,3 @@ category='error') raise HTTPFound(location=url('defaults')) - - def delete(self, id): - """DELETE /defaults/id: Delete an existing item""" - # Forms posted to this method should contain a hidden field: - # <input type="hidden" name="_method" value="DELETE" /> - # Or using helpers: - # h.form(url('default', id=ID), - # method='delete') - # url('default', id=ID) - - def show(self, id, format='html'): - """GET /defaults/id: Show a specific item""" - # url('default', id=ID) - - def edit(self, id, format='html'): - """GET /defaults/id/edit: Form to edit an existing item""" - # url('edit_default', id=ID)
--- a/kallithea/tests/functional/test_admin_defaults.py Thu Aug 04 14:23:36 2016 +0200 +++ b/kallithea/tests/functional/test_admin_defaults.py Thu Aug 04 14:23:36 2016 +0200 @@ -12,19 +12,6 @@ response.mustcontain('default_repo_enable_downloads') response.mustcontain('default_repo_enable_locking') - def test_index_as_xml(self): - response = self.app.get(url('formatted_defaults', format='xml')) - - def test_create(self): - response = self.app.post(url('defaults'), - {'_authentication_token': self.authentication_token()}) - - def test_new(self): - response = self.app.get(url('new_default')) - - def test_new_as_xml(self): - response = self.app.get(url('formatted_new_default', format='xml')) - def test_update_params_true_hg(self): self.log_user() params = { @@ -58,25 +45,3 @@ params.pop('_authentication_token') defs = Setting.get_default_repo_settings() assert params == defs - - def test_update_browser_fakeout(self): - response = self.app.post(url('default', id=1), params=dict(_method='put', _authentication_token=self.authentication_token())) - - def test_delete(self): - # Not possible due to CSRF protection. - response = self.app.delete(url('default', id=1), status=405) - - def test_delete_browser_fakeout(self): - response = self.app.post(url('default', id=1), params=dict(_method='delete', _authentication_token=self.authentication_token())) - - def test_show(self): - response = self.app.get(url('default', id=1)) - - def test_show_as_xml(self): - response = self.app.get(url('formatted_default', id=1, format='xml')) - - def test_edit(self): - response = self.app.get(url('edit_default', id=1)) - - def test_edit_as_xml(self): - response = self.app.get(url('formatted_edit_default', id=1, format='xml'))