From ccf73912f938ca5ee1b3649a7e95ae0f9a5b5143 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Tue, 31 May 2016 18:42:17 +0200 Subject: [PATCH] [FIX] review fixes --- partner_contact_gender/__init__.py | 2 +- .../tests/test_partner_contact_gender.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/partner_contact_gender/__init__.py b/partner_contact_gender/__init__.py index aaf89bb3f..15aa29dc7 100644 --- a/partner_contact_gender/__init__.py +++ b/partner_contact_gender/__init__.py @@ -3,4 +3,4 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models -from hooks import post_init_hook +from .hooks import post_init_hook diff --git a/partner_contact_gender/tests/test_partner_contact_gender.py b/partner_contact_gender/tests/test_partner_contact_gender.py index b19519f2d..4c7df1ad1 100644 --- a/partner_contact_gender/tests/test_partner_contact_gender.py +++ b/partner_contact_gender/tests/test_partner_contact_gender.py @@ -5,6 +5,14 @@ from openerp.tests.common import 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): from ..hooks import post_init_hook post_init_hook(self.cr, None) + self.assertEqual(self.testpartner.gender, 'female')