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

slapos_erp5: test marketing function

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