Test avec is-coworker True et un coworker type.

Test avec is_coworker False et un coworker type qui donne false.
This commit is contained in:
michel 2017-12-04 12:29:14 +01:00
parent 161dcdaafe
commit 817665d782

View File

@ -53,5 +53,8 @@ class TestCoworkingCoworker(TransactionCase):
homer = self.env['res.partner'].create({'name': 'Homer Simpson', 'is_coworker': False})
self.assertFalse(homer.coworker_type)
homer = self.env['res.partner'].create({'name': 'Homer Simpson', 'is_coworker': True})
self.assertTrue(homer.coworker_type)
homerf = self.env['res.partner'].create({'name': 'Homer Simpson', 'is_coworker': True})
self.assertEqual(homerf.coworker_type, u'Visitor')
# homer = self.env['res.partner'].create({'name': 'Homer Simpson', 'is_coworker': False})
# self.assertIs(homer.coworker_type, True)