Test avec True

This commit is contained in:
michel 2017-12-04 11:38:27 +01:00
parent 9e40808da7
commit 161dcdaafe

View File

@ -51,9 +51,7 @@ class TestCoworkingCoworker(TransactionCase):
def test_manage_coworker_type(self): def test_manage_coworker_type(self):
""" Test that non-coworker have not coworker_type fixed """ """ Test that non-coworker have not coworker_type fixed """
homer = self.env['res.partner'].create({'name': 'Homer Simpson', 'is_coworker': False}) homer = self.env['res.partner'].create({'name': 'Homer Simpson', 'is_coworker': False})
self.assertEqual(homer.coworker_type, False) self.assertFalse(homer.coworker_type)
#
# with self.assertRaises(ValidationError) as err: homer = self.env['res.partner'].create({'name': 'Homer Simpson', 'is_coworker': True})
# data = {'is_coworker': True, 'coworker_type': False} self.assertTrue(homer.coworker_type)
# self.env['res.partner'].create(data)
# self.assertIn('Coworker type is required', unicode(err.exception))