6 Commits

Author SHA1 Message Date
Serge Bayet (seba) 23c7f7c1da [FIX] test_themes: run configurator standalone test under mocked request
Commit [1] copies configurator pages during the flow. When the
standalone test leaves website_id in the context, that copy now tries
to create generic views with a website-scoped environment and hits the
ir.ui.view guard. Running the configurator inside MockRequest mimics the
real HTTP context (request-driven website, no forced id on the ORM), so
the copy succeeds and the test passes again.

[1]: https://github.com/odoo/odoo/commit/4231c9e545fdebdad034a4418f2a11e6691bac61

runbot-232963

closes odoo/design-themes#1160

X-original-commit: 501f57e840
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2025-09-30 17:13:11 +00:00
Serge Bayet (seba) 12243da5ce [FIX] test_themes: mock RPC calls in standalone configurator tests
The standalone theme configurator test
(test_02_theme_default_generate_primary_templates) failed locally
because `configurator_apply()` attempts to perform real HTTP requests
through `_website_api_rpc()` and `_OLG_api_rpc()`.

Standalone tests run without network access by design, so these calls
must be mocked to ensure deterministic behavior.

This commit patches both RPC methods during the test execution to return
minimal, valid fake payloads.

IAP itself does not need to be tested here: its behavior and endpoints
are already covered indirectly by the configurator_flow web tour test in
test_website_modules, which exercises the full configurator flow
end-to-end with real network access.

runbot-231270

closes odoo/design-themes#1157

X-original-commit: 42b78a247d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2025-09-27 06:43:19 +00:00
Krzysztof Magusiak (krma) a0bff7ba5b [MOV] website: MockRequest to tests.common
closes odoo/design-themes#1095

Related: odoo/odoo#212405
Related: odoo/enterprise#86717
Related: odoo/upgrade#7775
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2025-06-10 13:08:17 +00:00
qsm-odoo 9eecd12db1 [IMP] *: remove useless utf-8 declaration
Part-of: odoo/design-themes#919
Related: odoo/odoo#180736
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2024-09-21 16:34:53 +00:00
Romain Derie 1d47f8ad57 [IMP] test_themes: add test for fix about primary template generation
See previous commit.

closes odoo/design-themes#761

X-original-commit: 14c3bbb9ff
Related: odoo/odoo#151375
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2024-02-03 06:07:04 +00:00
Benoit Socias 51c310c785 [IMP] test_themes: test that theme_default templates are generated
This commit adds a test that verifies if the theme_default's
configurator templates are generated whenever the website module is
either installed or updated.

Related to https://github.com/odoo/odoo/pull/151501.

task-3670496

closes odoo/design-themes#763

X-original-commit: b8aae07df4
Related: odoo/odoo#151682
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2024-01-30 10:54:18 +00:00