[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) <moc@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit is contained in:
Pierre Paridans
2023-12-20 16:51:13 +00:00
parent 9dfb42f4a4
commit e975ff5289
@@ -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")