summaryrefslogtreecommitdiff
path: root/addons/website/tests/test_performance.py
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2020-03-26 18:07:20 +0000
committerRomain Derie <rde@odoo.com>2020-03-26 18:12:47 +0000
commit26c4de2f18be2b4e944ee255236d9a5a1710d94c (patch)
tree80e8ccc73369b1d825ee4161f8c32cb57a1048b5 /addons/website/tests/test_performance.py
parenta65d27cce98c1b0d303eeaf8f066fe4983afc7a8 (diff)
[IMP] http_routing: use cached code from lang
In case of short controller that don't use qweb template, we don't need anyhting else that this url code that don't change frequently. It make only sense for model like lang, website, ... that will not change frequently. And are called on each call by the dispatcher. In case of a website page, we will btw browse lang later, but in case of small controller like /favicon.ico, or page without qweb, ... we can just use the same from last query.
Diffstat (limited to 'addons/website/tests/test_performance.py')
-rw-r--r--addons/website/tests/test_performance.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website/tests/test_performance.py b/addons/website/tests/test_performance.py
index 0cbc7ce214d..2e02135116a 100644
--- a/addons/website/tests/test_performance.py
+++ b/addons/website/tests/test_performance.py
@@ -95,7 +95,7 @@ class TestWebsitePerformance(UtilPerf):
def test_30_perf_sql_queries_page_no_layout(self):
# website.page with no call to layout templates
self.page.arch = '<div>I am a blank page</div>'
- self.assertEqual(self._get_url_hot_query(self.page.url), 10)
+ self.assertEqual(self._get_url_hot_query(self.page.url), 9)
def test_40_perf_sql_queries_page_multi_level_menu(self):
# menu structure should not impact SQL requests