From 5acddcd304688c5eb7c75b28695b9de0ab0459e8 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Thu, 2 Jun 2022 16:26:18 +0000 Subject: [PATCH] [IMP] website, test_website: new standalone tags to ease runbot configs As we have more and more standalone tests related to the website app, it has been decided with the runbot team to introduce a unique tag to easily identify those tests. The goal is to make the runbot build config easier to manage, without the need to add the new tag name in the command. Instead, this build will be fired by finding and testing all the `website_standalone` tests. The other tags are kept to easily identify what are the test related to. Command without this (which need to be edited for each new tag): ``` --standalone cow_views,cow_views_inherit,theme_views,theme_upgrade ``` Now: ``` --standalone website_standalone ``` X-original-commit: a28c181b7f934bed06adccd2678d6c6db47422fe Part-of: odoo/odoo#93109 --- .../test_website/tests/test_views_during_module_operation.py | 4 ++-- addons/website/tests/test_views_inherit_module_update.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/test_website/tests/test_views_during_module_operation.py b/addons/test_website/tests/test_views_during_module_operation.py index f776027bed1..22f8a9af5c0 100644 --- a/addons/test_website/tests/test_views_during_module_operation.py +++ b/addons/test_website/tests/test_views_during_module_operation.py @@ -5,7 +5,7 @@ from odoo.addons.website.tools import MockRequest from odoo.tests import standalone -@standalone('cow_views') +@standalone('cow_views', 'website_standalone') def test_01_cow_views_unlink_on_module_update(env): """ Ensure COW views are correctly removed during module update. Not removing the view could lead to traceback: @@ -84,7 +84,7 @@ def test_01_cow_views_unlink_on_module_update(env): ]), "Specific COW views did not get removed!" -@standalone('theme_views') +@standalone('theme_views', 'website_standalone') def test_02_copy_ids_views_unlink_on_module_update(env): """ Ensure copy_ids views are correctly removed during module update. - Having an ir.ui.view A in the codebase, eg `website.layout` diff --git a/addons/website/tests/test_views_inherit_module_update.py b/addons/website/tests/test_views_inherit_module_update.py index 824db96defe..fc009adcdff 100644 --- a/addons/website/tests/test_views_inherit_module_update.py +++ b/addons/website/tests/test_views_inherit_module_update.py @@ -16,7 +16,7 @@ The view receiving the `inherit_id` update is either: from odoo.tests import standalone -@standalone('cow_views_inherit') +@standalone('cow_views_inherit', 'website_standalone') def test_01_cow_views_inherit_on_module_update(env): # A B A B # / \ => / \ @@ -48,7 +48,7 @@ def test_01_cow_views_inherit_on_module_update(env): assert child_cow_view.inherit_id == expected_parent_view, "COW view should also have received the `inherit_id` update." -@standalone('cow_views_inherit') +@standalone('cow_views_inherit', 'website_standalone') def test_02_cow_views_inherit_on_module_update(env): # A B B' A B B' # / \ => | |