Commit 9bb6cb63 authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: drop tests from dropped scripts

parent 8d0db763
......@@ -209,43 +209,6 @@ class TestPayzenEvent_getSecurityCategoryFromUserr(TestSlapOSCoreMixin):
self.assertEqual({'Assignee': [shadow_user_id]},
self.portal.PayzenEvent_getSecurityCategoryFromUser(["couscous", "destination_section"], None, event, None))
class TestComputeNode_getSecurityCategoryFromAllocationScope(TestSlapOSCoreMixin):
def test(self):
person = self.createPerson()
node = self.portal.compute_node_module.newContent(
portal_type='Compute Node', source_administration_value=person)
self.assertEqual([],
self.portal.ComputeNode_getSecurityCategoryFromAllocationScope([], None, None, None))
self.assertEqual([],
self.portal.ComputeNode_getSecurityCategoryFromAllocationScope([], None, node, None))
self.assertEqual([],
self.portal.ComputeNode_getSecurityCategoryFromAllocationScope(["destination_section"], None, node, None))
node.setAllocationScope('open/personal')
shadow_user_id = 'SHADOW-%s' % person.getUserId()
self.assertEqual({'Auditor': [shadow_user_id]},
self.portal.ComputeNode_getSecurityCategoryFromAllocationScope([], None, node, None))
self.assertEqual({'Auditor': [shadow_user_id]},
self.portal.ComputeNode_getSecurityCategoryFromAllocationScope(["destination_section"], None, node, None))
node.setAllocationScope('open/subscription')
self.assertEqual({'Auditor': ["R-SHADOW-PERSON"]},
self.portal.ComputeNode_getSecurityCategoryFromAllocationScope([], None, node, None))
self.assertEqual({'Auditor': ["R-SHADOW-PERSON"]},
self.portal.ComputeNode_getSecurityCategoryFromAllocationScope(["destination_section"], None, node, None))
node.setAllocationScope('open/public')
self.assertEqual({'Auditor': ["R-SHADOW-PERSON"]},
self.portal.ComputeNode_getSecurityCategoryFromAllocationScope([], None, node, None))
self.assertEqual({'Auditor': ["R-SHADOW-PERSON"]},
self.portal.ComputeNode_getSecurityCategoryFromAllocationScope(["destination_section"], None, node, None))
class TestERP5Type_getSecurityCategoryFromChildAssignmentList(TestSlapOSCoreMixin):
def test(self):
......
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