[FIX] website: make test determinist for single install
When running -i website --test-enable, the test was falsy. The last page created page was present in matching_page wich one is a criteria to be excluded from last modified page to avoid duplicate suggested page. Now we substract correctly them before comparison. https://github.com/odoo/odoo/blob/saas-13.4/addons/website/controllers/main.py#L243 closes odoo/odoo#57777 X-original-commit: 19319a7f88f474a6410ea1dabc6bcc1ac51e97bb Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com> Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
@@ -41,4 +41,6 @@ class TestControllers(tests.HttpCase):
|
||||
suggested_links = resp['result']
|
||||
last_modified_history = next(o for o in suggested_links['others'] if o["title"] == "Last modified pages")
|
||||
last_modified_values = map(lambda o: o['value'], last_modified_history['values'])
|
||||
self.assertTrue(set(last_modified_values) == set(last_5_url_edited))
|
||||
|
||||
matching_pages = set(map(lambda o: o['value'], suggested_links['matching_pages']))
|
||||
self.assertEqual(set(last_modified_values), set(last_5_url_edited) - matching_pages)
|
||||
|
||||
Reference in New Issue
Block a user