Defini homer comme non coworker et dit que le resultat de coworker-type est false

This commit is contained in:
michel 2017-12-04 11:32:09 +01:00
parent 32f8dd52ea
commit 9e40808da7

View File

@ -52,19 +52,7 @@ class TestCoworkingCoworker(TransactionCase):
""" 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)
# self.homer.write({'is_coworker': False})
# self.assertEqual(self.homer.coworker_type, 'False')
#
# self.homer.write({'coworker_type': 'worker'})
# self.assertEqual(self.homer.coworker_type, u'Worker')
# self.homer.write({'coworker_type': 'member'})
# self.assertEqual(self.homer.coworker_type, u'Member')
# self.homer.write({'coworker_type': 'volunteer'})
# self.assertEqual(self.homer.coworker_type, u'Volunteer')
# self.homer.write({'coworker_type': 'visitor'})
# self.assertEqual(self.homer.coworker_type, u'visitor')
# with self.assertRaises(ValidationError) as err:
# data = {'is_coworker': True, 'coworker_type': False}
# self.env['res.partner'].create(data)