From 35719dd640b6bbc7c0d7c3d08c58689752b8def7 Mon Sep 17 00:00:00 2001 From: Jordi Riera <547282+foutoucour@users.noreply.github.com> Date: Wed, 5 Dec 2018 10:28:00 -0500 Subject: [PATCH] setup web.base.url.freeze (TA#6960) (#96) (#97) * setup web.base.url.freeze (TA#6960) * add test --- numitech/__manifest__.py | 4 ++-- numitech/data/ir_config_parameter.xml | 10 ++++++++++ numitech/tests/__init__.py | 1 + numitech/tests/test_config.py | 9 +++++++++ 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 numitech/data/ir_config_parameter.xml create mode 100644 numitech/tests/test_config.py diff --git a/numitech/__manifest__.py b/numitech/__manifest__.py index 4b349662..1de96954 100644 --- a/numitech/__manifest__.py +++ b/numitech/__manifest__.py @@ -1,10 +1,9 @@ -# -*- coding: utf-8 -*- # © 2018 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). { 'name': 'Numitech', - 'version': '1.0.0', + 'version': '1.1.0', 'author': 'Numigi', 'maintainer': 'Numigi', 'license': 'LGPL-3', @@ -16,6 +15,7 @@ ], 'data': [ 'data/db_backup.xml', + 'data/ir_config_parameter.xml', ], 'installable': True, } diff --git a/numitech/data/ir_config_parameter.xml b/numitech/data/ir_config_parameter.xml new file mode 100644 index 00000000..41b3a9a8 --- /dev/null +++ b/numitech/data/ir_config_parameter.xml @@ -0,0 +1,10 @@ + + + + + + web.base.url.freeze + True + + + diff --git a/numitech/tests/__init__.py b/numitech/tests/__init__.py index 6da6a150..24af8f51 100644 --- a/numitech/tests/__init__.py +++ b/numitech/tests/__init__.py @@ -1 +1,2 @@ from . import test_installed_modules +from . import test_config diff --git a/numitech/tests/test_config.py b/numitech/tests/test_config.py new file mode 100644 index 00000000..f178ef79 --- /dev/null +++ b/numitech/tests/test_config.py @@ -0,0 +1,9 @@ + +from odoo.tests import TransactionCase + + +class TestConfig(TransactionCase): + + def test_web_base_url_freeze(self): + """ web.base.url.freeze is set.""" + self.assertTrue(self.env['ir.config_parameter'].sudo().get_param('web.base.url.freeze'))