[ADD]Coworker full address unit testing #11

Closed
fabien wants to merge 5 commits from fabien/michel_coworking:V5_unit_test into V5_unit_test
Showing only changes of commit 3a88646f7a - Show all commits

View File

@ -50,17 +50,11 @@ 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.homer.write({'is_coworker': False})
self.assertFalse(homer.coworker_type) self.assertFalse(self.homer.coworker_type)
homer = self.env['res.partner'].create({'name': 'Homer Simpson', self.homer.write({'coworker_type': 'visitor'})
'is_coworker': True, self.assertEqual(self.homer.coworker_type, 'visitor')
'coworker_type': 'visitor'})
self.assertEqual(homer.coworker_type, 'visitor')
self.homer.write({'is_coworker': False, 'coworker_type': 'staffer'})
homer = self.env['res.partner'].create({'name': 'Homer Simpson', self.assertFalse(self.homer.coworker_type)
'is_coworker': False,
'coworker_type': 'staffer'})
self.assertFalse(homer.coworker_type)