Debut du test coworker type
This commit is contained in:
parent
97192b2a3c
commit
32f8dd52ea
@ -50,6 +50,22 @@ 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})
|
||||||
|
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')
|
||||||
|
|
||||||
pass
|
# 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))
|
||||||
|
Loading…
Reference in New Issue
Block a user