summaryrefslogtreecommitdiff
path: root/addons/test_website/controllers/main.py
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2021-01-21 17:20:59 +0000
committerJeremy Kersten <jke@odoo.com>2021-01-25 13:36:30 +0000
commitf6f9671963640dbd7de33a8cc4597c9d9db7cfba (patch)
treea2511cbd83017c75f60ae1915e08619985715f42 /addons/test_website/controllers/main.py
parent62ee506a94b9fc4a6198c87cb8a2f186ed8bc6d3 (diff)
[IMP] test_website: add tests for controller slug matching
Be sure that we have a beautiful error page and not a black/white error Be sure that slug_matching with 308 redirect works as expected and don't raise a RequestUID exception. closes odoo/odoo#64889 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/test_website/controllers/main.py')
-rw-r--r--addons/test_website/controllers/main.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/test_website/controllers/main.py b/addons/test_website/controllers/main.py
index feac61c9614..f36053cd38f 100644
--- a/addons/test_website/controllers/main.py
+++ b/addons/test_website/controllers/main.py
@@ -127,7 +127,10 @@ class WebsiteTest(Home):
return 'Basic Controller Content'
# Test Redirects
-
@http.route(['/test_website/country/<model("res.country"):country>'], type='http', auth="public", website=True, sitemap=False)
def test_model_converter_country(self, country, **kw):
return request.render('test_website.test_redirect_view', {'country': country})
+
+ @http.route(['/test_website/200/<model("test.model"):rec>'], type='http', auth="public", website=True, sitemap=False)
+ def test_model_converter_seoname(self, rec, **kw):
+ return request.make_response('ok')