Commit 6ab3477c authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: test: role is not required on a Person

parent 3f072bc4
......@@ -475,21 +475,6 @@ class TestSlapOSInstanceTreeConstraint(TestSlapOSConstraintMixin):
class TestSlapOSPersonConstraint(TestSlapOSConstraintMixin):
def test_role(self):
person = self.portal.person_module.newContent(portal_type='Person')
consistency_message = 'One role should be defined'
self.assertTrue(consistency_message in self.getMessageList(person))
role_id_list = list(self.portal.portal_categories.role.objectIds())
self.assertTrue(len(role_id_list) >= 2)
person.setRole(role_id_list[0])
self.assertFalse(consistency_message in self.getMessageList(person))
person.setRoleList(role_id_list)
self.assertTrue(consistency_message in self.getMessageList(person))
person.setRole(role_id_list[0])
self.assertFalse(consistency_message in self.getMessageList(person))
def test_subordination_state(self):
organisation = self.portal.organisation_module.newContent(
portal_type='Organisation')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment