Files
odoo_source/addons/website_event_track/tests/test_website.py
T
Pierre Paridans 922d81dc9c [IMP] website_event_track: allow customization of the PWA's name
This commit adds a website-specific and customizable app name for the
Events' Progressive Web Application, configurable through the website's
settings.

Defaults to '<website_name> Events'.

closes odoo/odoo#56564

X-original-commit: 423076ddf1da0fc61d9a18dc19bbbbf900e3dad6
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-08-26 09:17:12 +00:00

22 lines
812 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
# -*- coding: utf-8 -*-
from odoo.tests import tagged
from odoo.tests.common import TransactionCase
@tagged('post_install','-at_install')
class TestWebsite(TransactionCase):
def test_event_app_name(self):
website0 = self.env['website'].create({'name': 'Foo'})
self.assertEqual(website0.events_app_name, 'Foo Events')
website1 = self.env['website'].create({'name': 'Foo', 'events_app_name': 'Bar Events'})
self.assertEqual(website1.events_app_name, 'Bar Events')
website2 = self.env['website'].create({'name': 'Foo'})
self.assertEqual(website2.events_app_name, 'Foo Events')
website2.write({'name': 'Bar'})
self.assertEqual(website2.events_app_name, 'Foo Events')