diff --git a/kallithea/controllers/admin/defaults.py b/kallithea/controllers/admin/defaults.py --- a/kallithea/controllers/admin/defaults.py +++ b/kallithea/controllers/admin/defaults.py @@ -69,14 +69,6 @@ class DefaultsController(BaseController) 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 @@ class DefaultsController(BaseController) 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: - # - # 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) diff --git a/kallithea/tests/functional/test_admin_defaults.py b/kallithea/tests/functional/test_admin_defaults.py --- a/kallithea/tests/functional/test_admin_defaults.py +++ b/kallithea/tests/functional/test_admin_defaults.py @@ -12,19 +12,6 @@ class TestDefaultsController(TestControl 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 @@ class TestDefaultsController(TestControl 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'))