-
-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] website_cookiebot: Migration to 16.0
- Loading branch information
1 parent
9133d8c
commit e515650
Showing
6 changed files
with
33 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,6 @@ | |
* `Tecnativa <https://www.tecnativa.com/>`__: | ||
* Jairo Llopis | ||
* Stefan Ungureanu | ||
|
||
* `NICO SOLUTIONS - ENGINEERING & IT <https://www.nico-solutions.de/>`__: | ||
* Nils Coenen <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import test_res_config_settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2021 NICO SOLUTIONS - ENGINEERING & IT, Nils Coenen | ||
# License APL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo.tests.common import TransactionCase | ||
|
||
|
||
class TestResConfigSettings(TransactionCase): | ||
def setUp(self): | ||
super(TestResConfigSettings, self).setUp() | ||
self.website = self.env["website"].create( | ||
{"name": "Test Website", "cookiebot_dgid": "test_dgid"} | ||
) | ||
self.res_config_settings = self.env["res.config.settings"].create( | ||
{"website_id": self.website.id} | ||
) | ||
|
||
def test_compute_cookiebot_enabled(self): | ||
self.res_config_settings._compute_cookiebot_enabled() | ||
self.assertTrue(self.res_config_settings.cookiebot_enabled) | ||
|
||
def test_compute_cookiebot_enabled_no_dgid(self): | ||
self.website.cookiebot_dgid = False | ||
self.res_config_settings._compute_cookiebot_enabled() | ||
self.assertFalse(self.res_config_settings.cookiebot_enabled) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters