Skip to content
Snippets Groups Projects
Commit b608aa30 authored by Jeremy Kersten's avatar Jeremy Kersten
Browse files

[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#57773

X-original-commit: 19319a7f88f474a6410ea1dabc6bcc1ac51e97bb
Signed-off-by: default avatarXavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
parent aad941f6
Branches
Tags
No related merge requests found
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment