From e975ff5289d7d84ce72d9603328454eaba13343b Mon Sep 17 00:00:00 2001 From: Pierre Paridans Date: Tue, 19 Dec 2023 15:43:34 +0100 Subject: [PATCH] [FIX] website_sale: broken tour setup on multi websites The `test_01_shop_mail_tour` test was modified in commit [1] to make it independent of demo data. But the unique constraint on `domain` field (cf. commit [2]) make it break when run with 3 or more websites. This commit made the dummy domain assigned in this test non-unique, which doesn't alter the original meaning of the test but, allows to run it with multiple existing websites. Note: this fix is similar to commit [3]. runbot-52417 [1]: https://github.com/odoo/odoo/commit/ad6e975fb1bf12c744764d40ed64e990bc0a9440 [2]: https://github.com/odoo/odoo/commit/507db4e179514d171ec82e8ea0cbaf2323a6c30d [3]: https://github.com/odoo/odoo/commit/0c522e42a82ec596e69611c556c4fc0d50e6e978 closes odoo/odoo#146984 X-original-commit: ec67c8f1090e90b44f45527f10ea72f235ca5c65 Signed-off-by: Christophe Monniez (moc) Signed-off-by: Pierre Paridans (app) --- addons/website_sale/tests/test_website_sale_mail.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website_sale/tests/test_website_sale_mail.py b/addons/website_sale/tests/test_website_sale_mail.py index 5679addf090..1ffe31b5a4f 100644 --- a/addons/website_sale/tests/test_website_sale_mail.py +++ b/addons/website_sale/tests/test_website_sale_mail.py @@ -36,7 +36,8 @@ class TestWebsiteSaleMail(HttpCase): # We change the domain of the website to test that the email that # will be sent uses the correct domain for its links. main_website.domain = "my-test-domain.com" - other_websites.domain = "https://domain-not-used.fr" + for w in other_websites: + w.domain = f'domain-not-used-{w.id}.fr' with patch.object(MailMail, 'unlink', lambda self: None): start_time = fields.Datetime.now() self.start_tour("/", 'shop_mail', login="admin")