Commit 0c2e2d58 authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: test Sale Packing List local roles

parent 93682b4a
......@@ -1372,3 +1372,25 @@ class TestHostingSubscription(TestSlapOSGroupRoleSecurityMixin):
[self.user_id], False)
self.assertRoles(hosting_subscription, self.user_id, ['Owner'])
class TestSalePackingListModule(TestSlapOSGroupRoleSecurityMixin):
def test_SalePackingListModule(self):
module = self.portal.sale_packing_list_module
self.assertSecurityGroup(module,
['F-SALE*', 'F-ACCOUNTING*', module.Base_getOwnerId()], False)
self.assertRoles(module, 'F-SALE*', ['Auditor'])
self.assertRoles(module, 'F-ACCOUNTING*', ['Auditor'])
self.assertRoles(module, 'F-SALE*', ['Auditor'])
self.assertRoles(module, module.Base_getOwnerId(), ['Owner'])
class TestSalePackingList(TestSlapOSGroupRoleSecurityMixin):
def test_SalePackingList_default(self):
delivery = self.portal.sale_packing_list_module.newContent(
portal_type='Sale Packing List')
self.assertSecurityGroup(delivery,
['F-SALE*', 'F-ACCOUNTING*', self.user_id], False)
self.assertRoles(delivery, self.user_id, ['Owner'])
self.assertRoles(delivery, 'F-SALE*', ['Auditor'])
self.assertRoles(delivery, 'F-ACCOUNTING*', ['Auditor'])
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