Mercurial > kallithea
view kallithea/tests/functional/test_basecontroller.py @ 8687:5e46f73f0d1c
model: always import the whole db module - drop "from" imports
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 12 Oct 2020 11:12:37 +0200 |
parents | ee6b7e9f34e6 |
children |
line wrap: on
line source
from kallithea.tests.base import TestController, url class TestBaseController(TestController): def test_banned_http_methods(self): self.app.request(url(controller='login', action='index'), method='PUT', status=405) self.app.request(url(controller='login', action='index'), method='DELETE', status=405) def test_banned_http_method_override(self): self.app.get(url(controller='login', action='index'), {'_method': 'POST'}, status=405) self.app.post(url(controller='login', action='index'), {'_method': 'PUT'}, status=405)