Commit 523f0c3a authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: test marketing function

parent ead66d0c
......@@ -2120,38 +2120,38 @@ class TestWebPageModule(TestSlapOSGroupRoleSecurityMixin):
module = self.portal.web_page_module
self.changeOwnership(module)
self.assertSecurityGroup(module,
['G-COMPANY', self.user_id], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
['F-MARKETING*', self.user_id], True)
self.assertRoles(module, 'F-MARKETING*', ['Auditor', 'Author'])
self.assertRoles(module, self.user_id, ['Owner'])
class TestWebPage(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
def test_MarketingFunction(self):
document = self.portal.web_page_module.newContent(
portal_type='Web Page')
document.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(document,
['G-COMPANY', self.user_id], False)
self.assertRoles(document, 'G-COMPANY', ['Assignor'])
['F-MARKETING*', self.user_id], False)
self.assertRoles(document, 'F-MARKETING*', ['Assignor'])
self.assertRoles(document, self.user_id, ['Owner'])
class TestWebTable(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
def test_MarketingFunction(self):
document = self.portal.web_page_module.newContent(
portal_type='Web Table')
document.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(document,
['G-COMPANY', self.user_id], False)
self.assertRoles(document, 'G-COMPANY', ['Assignor'])
['F-MARKETING*', self.user_id], False)
self.assertRoles(document, 'F-MARKETING*', ['Assignor'])
self.assertRoles(document, self.user_id, ['Owner'])
class TestWebIllustration(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
def test_MarketingFunction(self):
document = self.portal.web_page_module.newContent(
portal_type='Web Illustration')
document.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(document,
['G-COMPANY', self.user_id], False)
self.assertRoles(document, 'G-COMPANY', ['Assignor'])
['F-MARKETING*', self.user_id], False)
self.assertRoles(document, 'F-MARKETING*', ['Assignor'])
self.assertRoles(document, self.user_id, ['Owner'])
class TestIntegrationTool(TestSlapOSGroupRoleSecurityMixin):
......
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