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.

18 lines
648 B

  1. # Copyright 2016-2018 Therp BV <https://therp.nl>.
  2. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  3. from odoo.tests.common import TransactionCase
  4. class TestPartnerContactGender(TransactionCase):
  5. def setUp(self):
  6. super(TestPartnerContactGender, self).setUp()
  7. self.testpartner = self.env['res.partner'].create({
  8. 'name': 'test',
  9. 'title': self.env.ref('base.res_partner_title_madam').id,
  10. })
  11. def test_partner_contact_gender(self):
  12. from ..hooks import post_init_hook
  13. post_init_hook(self.cr, None)
  14. self.assertEqual(self.testpartner.gender, 'female')