Commit ec0e06f8 authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: fixup test

parent 21831a16
......@@ -65,21 +65,25 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
# updateLocalRolesOnSecurityGroups.
person = self.portal.person_module.newContent(portal_type='Person')
self.assertSecurityGroup(person, [self.user_id, 'G-COMPANY'], False)
self.assertSecurityGroup(person, [self.user_id, 'F-ACCMAN',
'F-SALEAGT', 'F-ACCAGT', 'F-SALEMAN'], False)
person.edit(reference='TESTPER-%s' % self.generateNewId())
self.commit()
self.assertSecurityGroup(person, [self.user_id, 'G-COMPANY'], False)
self.assertSecurityGroup(person, [self.user_id, 'F-ACCMAN',
'F-SALEAGT', 'F-ACCAGT', 'F-SALEMAN'], False)
def test_Person_newContent(self):
person = self.portal.person_module.newContent(portal_type='Person')
self.assertSecurityGroup(person, [self.user_id, 'G-COMPANY'], False)
self.assertSecurityGroup(person, [self.user_id, 'F-ACCMAN',
'F-SALEAGT', 'F-ACCAGT', 'F-SALEMAN'], False)
person.newContent(portal_type="ERP5 Login")
self.commit()
self.assertSecurityGroup(person, [self.user_id, 'G-COMPANY',
self.assertSecurityGroup(person, [self.user_id, 'F-ACCMAN',
'F-SALEAGT', 'F-ACCAGT', 'F-SALEMAN',
person.getUserId(), 'SHADOW-%s' % person.getUserId()], False)
......
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