-
-
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 17.0
- Loading branch information
Showing
4 changed files
with
66 additions
and
44 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from . import test_website_cookiebot |
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,23 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from odoo.tests.common import TransactionCase | ||
from odoo.tests import mock | ||
|
||
class TestWebsiteCookiebot(TransactionCase): | ||
|
||
def test_conf_cookiebot_domain(self): | ||
domain_group_id = '9a9999a9-aa99-9a99-999a-aa999999999a' | ||
config = self.env['res.config.settings'].sudo().create({}) | ||
config.write({'cookiebot_dgid': domain_group_id}) | ||
self.assertTrue(config.cookiebot_enabled) | ||
self.assertFalse(config.website_cookies_bar) | ||
self.assertEqual(config.cookiebot_dgid, domain_group_id) | ||
|
||
def test_conf_website_cookies_bar(self): | ||
config = self.env['res.config.settings'].sudo().create({}) | ||
config.write({'website_cookies_bar': True}) | ||
config.onchange_website_cookies_bar() | ||
self.assertTrue(config.website_cookies_bar) | ||
self.assertFalse(config.cookiebot_enabled) | ||
self.assertFalse(config.cookiebot_dgid) |
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