Files
odoo_source/addons/snailmail/tests/test_neutralize.py
T
Christophe Monniez 4fc7b9e329 [IMP] iap, various: implement _neutralize method
An overridable model method was added in a previous commit in order to
neutralize a database.

This commit adds the implementation of this method on the `iap.account` model.
A _get_iap_config_paremeters method is also added on this model.
Each iap service must override this method to extend the list of
`ir.config_parameter` that need to be neutralized.

Part-of: odoo/odoo#67825
2022-02-01 09:54:08 +00:00

18 lines
567 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests.common import TransactionCase
class TestSnailMailNeutralize(TransactionCase):
def test_snailmail_neutralize(self):
key = 'snailmail.endpoint'
self.env['ir.config_parameter'].create({
'key': key,
'value': 'fake test snailmail endpoint'
})
self.env['iap.account']._neutralize()
self.assertEqual(self.env['ir.config_parameter'].get_param(key), 'https://iap-services-test.odoo.com')