You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
830 B

  1. # © 2016 Yannick Vaucher (Camptocamp SA)
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. import odoo.tests.common as common
  4. class TestAbstractSettings(common.TransactionCase):
  5. def setUp(self):
  6. import pdb; pdb.set_trace()
  7. super(TestAbstractSettings, self).setUp()
  8. self.partner_id = self.ref('base.res_partner_12')
  9. self.company = self.env.ref('base.main_company')
  10. def test_config(self):
  11. wiz = self.env['res.config.settings'].create({})
  12. wiz.name = 'Toto'
  13. wiz.integer = 11
  14. wiz.partner_id = self.partner_id
  15. wiz.execute()
  16. self.assertEqual(self.company.prefix_a_name, wiz.name)
  17. self.assertEqual(self.company.prefix_a_integer, wiz.integer)
  18. self.assertEqual(self.company.prefix_a_partner_id, wiz.partner_id)