Merge branch 'V5_unit_test' of ssh://git.yaltik.net:61722/michel/Coworking into V5_unit_test

This commit is contained in:
Fabien BOURGEOIS 2017-12-04 12:15:26 +01:00
commit 272eeb0813

View File

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