Browse Source

[FIX] review fixes

pull/280/head
Holger Brunn 9 years ago
parent
commit
ccf73912f9
No known key found for this signature in database GPG Key ID: 1C9760FECA3AE18
  1. 2
      partner_contact_gender/__init__.py
  2. 8
      partner_contact_gender/tests/test_partner_contact_gender.py

2
partner_contact_gender/__init__.py

@ -3,4 +3,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models from . import models
from hooks import post_init_hook
from .hooks import post_init_hook

8
partner_contact_gender/tests/test_partner_contact_gender.py

@ -5,6 +5,14 @@ from openerp.tests.common import TransactionCase
class TestPartnerContactGender(TransactionCase): class TestPartnerContactGender(TransactionCase):
def setUp(self):
super(TestPartnerContactGender, self).setUp()
self.testpartner = self.env['res.partner'].create({
'name': 'test',
'title': self.env.ref('base.res_partner_title_madam').id,
})
def test_partner_contact_gender(self): def test_partner_contact_gender(self):
from ..hooks import post_init_hook from ..hooks import post_init_hook
post_init_hook(self.cr, None) post_init_hook(self.cr, None)
self.assertEqual(self.testpartner.gender, 'female')
Loading…
Cancel
Save