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
18 lines
555 B
Python
18 lines
555 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo.tests.common import TransactionCase
|
|
|
|
|
|
class TestSmsNeutralize(TransactionCase):
|
|
|
|
def test_sms_neutralize(self):
|
|
sms_key = 'sms.endpoint'
|
|
self.env['ir.config_parameter'].create({
|
|
'key': sms_key,
|
|
'value': 'fake test sms endpoint'
|
|
})
|
|
|
|
self.env['iap.account']._neutralize()
|
|
self.assertEqual(self.env['ir.config_parameter'].get_param(sms_key), 'https://iap-services-test.odoo.com')
|