Commit 11bdc499 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_erp5: testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow use...

slapos_erp5: testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow use person.getUserId instead person.getReference
parent e2f39f10
...@@ -13,6 +13,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -13,6 +13,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
reference="live_test_%s" % new_id, reference="live_test_%s" % new_id,
) )
self.person_reference = self.person_user.getReference() self.person_reference = self.person_user.getReference()
self.person_user_id = self.person_user.getUserId()
def test_ComputerModel_edit(self): def test_ComputerModel_edit(self):
self._makePerson() self._makePerson()
...@@ -24,7 +25,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -24,7 +25,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(model, self.assertSecurityGroup(model,
['G-COMPANY', self.user_id, self.person_reference], False) ['G-COMPANY', self.user_id, self.person_user_id], False)
def test_ComputerNetwork_edit(self): def test_ComputerNetwork_edit(self):
self._makePerson() self._makePerson()
...@@ -37,7 +38,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -37,7 +38,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(network, self.assertSecurityGroup(network,
['G-COMPANY', self.user_id, self.person_reference, 'R-SHADOW-PERSON'], ['G-COMPANY', self.user_id, self.person_user_id, 'R-SHADOW-PERSON'],
False) False)
def test_Computer_setReference(self): def test_Computer_setReference(self):
...@@ -60,7 +61,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -60,7 +61,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(computer, ['G-COMPANY', self.user_id, self.assertSecurityGroup(computer, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_Computer_setAllocationScope(self): def test_Computer_setAllocationScope(self):
computer = self.portal.computer_module.newContent(portal_type='Computer') computer = self.portal.computer_module.newContent(portal_type='Computer')
...@@ -82,7 +83,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -82,7 +83,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(computer, ['G-COMPANY', self.user_id, self.assertSecurityGroup(computer, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_Computer_reindexObject(self): def test_Computer_reindexObject(self):
computer = self.portal.computer_module.template_computer\ computer = self.portal.computer_module.template_computer\
...@@ -135,7 +136,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -135,7 +136,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(hosting_subscription, [self.user_id, self.assertSecurityGroup(hosting_subscription, [self.user_id,
hosting_subscription.getId(), self.person_user.getReference(), hosting_subscription.getId(), self.person_user.getUserId(),
'G-COMPANY'], 'G-COMPANY'],
False) False)
...@@ -147,7 +148,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -147,7 +148,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(person, [self.user_id, 'G-COMPANY', self.assertSecurityGroup(person, [self.user_id, 'G-COMPANY',
person.getReference(), 'SHADOW-%s' % person.getReference()], False) person.getUserId(), 'SHADOW-%s' % person.getReference()], False)
def test_SoftwareInstallation_setAggregate(self): def test_SoftwareInstallation_setAggregate(self):
installation = self.portal.software_installation_module.newContent( installation = self.portal.software_installation_module.newContent(
...@@ -175,7 +176,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -175,7 +176,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(installation, [self.user_id, 'G-COMPANY', self.assertSecurityGroup(installation, [self.user_id, 'G-COMPANY',
self.person_user.getReference()], False) self.person_user.getUserId()], False)
def test_SoftwareInstance_setSpecialise(self): def test_SoftwareInstance_setSpecialise(self):
software_instance = self.portal.software_instance_module.newContent( software_instance = self.portal.software_instance_module.newContent(
...@@ -277,7 +278,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -277,7 +278,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
self.assertSecurityGroup(payment_transaction, [self.user_id, self.assertSecurityGroup(payment_transaction, [self.user_id,
'G-COMPANY', 'SHADOW-%s' % self.person_user.getReference(), 'G-COMPANY', 'SHADOW-%s' % self.person_user.getReference(),
self.person_user.getReference()], self.person_user.getUserId()],
False) False)
def test_PayzenEvent_setDestinationSection(self): def test_PayzenEvent_setDestinationSection(self):
...@@ -334,7 +335,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -334,7 +335,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(sale_invoice_transaction, [self.user_id, self.assertSecurityGroup(sale_invoice_transaction, [self.user_id,
'G-COMPANY', self.person_user.getReference()], 'G-COMPANY', self.person_user.getUserId()],
False) False)
def test_SupportRequest_setDestinationDecision(self): def test_SupportRequest_setDestinationDecision(self):
...@@ -347,7 +348,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -347,7 +348,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(support_request, ['G-COMPANY', self.user_id, self.assertSecurityGroup(support_request, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_RegularisationRequest_setDestinationDecision(self): def test_RegularisationRequest_setDestinationDecision(self):
self._makePerson() self._makePerson()
...@@ -359,7 +360,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -359,7 +360,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(regularisation_request, ['G-COMPANY', self.user_id, self.assertSecurityGroup(regularisation_request, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_Acknowledgement_setDestination(self): def test_Acknowledgement_setDestination(self):
self._makePerson() self._makePerson()
...@@ -371,7 +372,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -371,7 +372,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_Acknowledgement_setSource(self): def test_Acknowledgement_setSource(self):
self._makePerson() self._makePerson()
...@@ -383,7 +384,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -383,7 +384,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_FaxMessage_setDestination(self): def test_FaxMessage_setDestination(self):
self._makePerson() self._makePerson()
...@@ -395,7 +396,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -395,7 +396,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_FaxMessage_setSource(self): def test_FaxMessage_setSource(self):
self._makePerson() self._makePerson()
...@@ -407,7 +408,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -407,7 +408,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_Letter_setDestination(self): def test_Letter_setDestination(self):
self._makePerson() self._makePerson()
...@@ -419,7 +420,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -419,7 +420,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_Letter_setSource(self): def test_Letter_setSource(self):
self._makePerson() self._makePerson()
...@@ -431,7 +432,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -431,7 +432,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_MailMessage_setDestination(self): def test_MailMessage_setDestination(self):
self._makePerson() self._makePerson()
...@@ -443,7 +444,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -443,7 +444,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_MailMessage_setSource(self): def test_MailMessage_setSource(self):
self._makePerson() self._makePerson()
...@@ -455,7 +456,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -455,7 +456,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_Note_setDestination(self): def test_Note_setDestination(self):
self._makePerson() self._makePerson()
...@@ -467,7 +468,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -467,7 +468,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_Note_setSource(self): def test_Note_setSource(self):
self._makePerson() self._makePerson()
...@@ -479,7 +480,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -479,7 +480,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_PhoneCall_setDestination(self): def test_PhoneCall_setDestination(self):
self._makePerson() self._makePerson()
...@@ -491,7 +492,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -491,7 +492,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_PhoneCall_setSource(self): def test_PhoneCall_setSource(self):
self._makePerson() self._makePerson()
...@@ -503,7 +504,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -503,7 +504,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_ShortMessage_setDestination(self): def test_ShortMessage_setDestination(self):
self._makePerson() self._makePerson()
...@@ -515,7 +516,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -515,7 +516,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_ShortMessage_setSource(self): def test_ShortMessage_setSource(self):
self._makePerson() self._makePerson()
...@@ -527,7 +528,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -527,7 +528,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_SiteMessage_setDestination(self): def test_SiteMessage_setDestination(self):
self._makePerson() self._makePerson()
...@@ -539,7 +540,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -539,7 +540,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_SiteMessage_setSource(self): def test_SiteMessage_setSource(self):
self._makePerson() self._makePerson()
...@@ -551,7 +552,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -551,7 +552,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_Visit_setDestination(self): def test_Visit_setDestination(self):
self._makePerson() self._makePerson()
...@@ -563,7 +564,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -563,7 +564,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_Visit_setSource(self): def test_Visit_setSource(self):
self._makePerson() self._makePerson()
...@@ -575,7 +576,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -575,7 +576,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_WebMessage_setDestination(self): def test_WebMessage_setDestination(self):
self._makePerson() self._makePerson()
...@@ -587,7 +588,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -587,7 +588,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_WebMessage_setSource(self): def test_WebMessage_setSource(self):
self._makePerson() self._makePerson()
...@@ -599,7 +600,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -599,7 +600,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(event, ['G-COMPANY', self.user_id, self.assertSecurityGroup(event, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_SalePackingList_setSpecialise(self): def test_SalePackingList_setSpecialise(self):
self._makePerson() self._makePerson()
...@@ -613,7 +614,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -613,7 +614,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(sale_packing_list, ['G-COMPANY', self.user_id, self.assertSecurityGroup(sale_packing_list, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
def test_SalePackingList_setDestinationDecision(self): def test_SalePackingList_setDestinationDecision(self):
self._makePerson() self._makePerson()
...@@ -627,4 +628,4 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( ...@@ -627,4 +628,4 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
transaction.commit() transaction.commit()
self.assertSecurityGroup(sale_packing_list, ['G-COMPANY', self.user_id, self.assertSecurityGroup(sale_packing_list, ['G-COMPANY', self.user_id,
self.person_reference], False) self.person_user_id], False)
...@@ -6,10 +6,22 @@ ...@@ -6,10 +6,22 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow</string> </value> <value> <string>testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow</string> </value>
</item> </item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow</string> </value> <value> <string>test.erp5.testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow</string> </value>
...@@ -27,9 +39,7 @@ ...@@ -27,9 +39,7 @@
<item> <item>
<key> <string>text_content_error_message</string> </key> <key> <string>text_content_error_message</string> </key>
<value> <value>
<tuple> <tuple/>
<string>F: 2, 0: Unable to import \'testSlapOSERP5GroupRoleSecurity\' (import-error)</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
...@@ -45,13 +55,28 @@ ...@@ -45,13 +55,28 @@
<item> <item>
<key> <string>workflow_history</string> </key> <key> <string>workflow_history</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="PersistentMapping" module="Persistence.mapping"/> <global name="PersistentMapping" module="Persistence.mapping"/>
</pickle> </pickle>
...@@ -64,7 +89,7 @@ ...@@ -64,7 +89,7 @@
<item> <item>
<key> <string>component_validation_workflow</string> </key> <key> <string>component_validation_workflow</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -73,7 +98,7 @@ ...@@ -73,7 +98,7 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM="> <record id="4" aka="AAAAAAAAAAQ=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle> </pickle>
......
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