Commit b9120af9 authored by Łukasz Nowak's avatar Łukasz Nowak

Test up to Organisation.

parent 7c712feb
...@@ -357,11 +357,26 @@ class TestImage(TestSlapOSGroupRoleSecurityMixin): ...@@ -357,11 +357,26 @@ class TestImage(TestSlapOSGroupRoleSecurityMixin):
class TestImageModule(TestSlapOSGroupRoleSecurityMixin): class TestImageModule(TestSlapOSGroupRoleSecurityMixin):
def test(self): def test(self):
raise NotImplementedError module = self.portal.image_module
self.assertSecurityGroup(module,
['R-COMPUTER', 'R-INSTANCE', 'R-MEMBER', 'zope', 'G-COMPANY'], False)
self.assertRoles(module, 'R-COMPUTER', ['Author'])
self.assertRoles(module, 'R-INSTANCE', ['Author'])
self.assertRoles(module, 'R-MEMBER', ['Author'])
self.assertRoles(module, 'G-COMPANY', ['Author', 'Auditor'])
self.assertRoles(module, 'zope', ['Owner'])
class TestOrganisation(TestSlapOSGroupRoleSecurityMixin): class TestOrganisation(TestSlapOSGroupRoleSecurityMixin):
def test(self): def test_GroupCompany(self):
raise NotImplementedError organisation = self.portal.organisation_module.newContent(
portal_type='Organisation')
organisation.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(organisation,
['G-COMPANY', self.user_id, 'R-MEMBER'], False)
self.assertRoles(organisation, 'G-COMPANY', ['Assignor'])
self.assertRoles(organisation, 'R-MEMBER', ['Auditor'])
test_Member = test_GroupCompany
class TestOrganisationModule(TestSlapOSGroupRoleSecurityMixin): class TestOrganisationModule(TestSlapOSGroupRoleSecurityMixin):
def test(self): def test(self):
......
50 51
\ No newline at end of file \ No newline at end of file
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