Commit 78298d5c authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: project needed in test

parent e4f1befb
......@@ -31,6 +31,7 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflow(SlapOSTestCaseMixin):
SlapOSTestCaseMixin.afterSetUp(self)
portal = self.getPortalObject()
new_id = self.generateNewId()
self.project = self.addProject()
self.request_kw = dict(
software_release=self.generateNewSoftwareReleaseUrl(),
......@@ -39,7 +40,8 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflow(SlapOSTestCaseMixin):
instance_xml=self.generateSafeXml(),
sla_xml=self.generateSafeXml(),
shared=False,
state="started"
state="started",
project_reference=self.project.getReference()
)
# prepare part of tree
......@@ -56,7 +58,8 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflow(SlapOSTestCaseMixin):
text_content=self.request_kw['instance_xml'],
sla_xml=self.request_kw['sla_xml'],
root_slave=self.request_kw['shared'],
successor=self.software_instance.getRelativeUrl()
successor=self.software_instance.getRelativeUrl(),
follow_up_value=self.project
)
instance_tree.validate()
self.portal.portal_workflow._jumpToStateFor(instance_tree, 'start_requested')
......@@ -68,7 +71,8 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflow(SlapOSTestCaseMixin):
source_reference=self.request_kw['software_type'],
text_content=self.request_kw['instance_xml'],
sla_xml=self.request_kw['sla_xml'],
specialise=instance_tree.getRelativeUrl()
specialise=instance_tree.getRelativeUrl(),
follow_up_value=self.project
)
self.portal.portal_workflow._jumpToStateFor(self.software_instance, 'start_requested')
self.software_instance.validate()
......@@ -870,6 +874,7 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflowTransfer(SlapOSTestCaseMixin):
SlapOSTestCaseMixin.afterSetUp(self)
portal = self.getPortalObject()
new_id = self.generateNewId()
self.project = self.addProject()
self.request_kw = dict(
software_release=self.generateNewSoftwareReleaseUrl(),
......@@ -878,7 +883,8 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflowTransfer(SlapOSTestCaseMixin):
instance_xml=self.generateSafeXml(),
sla_xml=self.generateSafeXml(),
shared=False,
state="started"
state="started",
project_reference=self.project.getReference()
)
# prepare part of tree
......@@ -895,7 +901,8 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflowTransfer(SlapOSTestCaseMixin):
text_content=self.request_kw['instance_xml'],
sla_xml=self.request_kw['sla_xml'],
root_slave=self.request_kw['shared'],
successor=self.software_instance.getRelativeUrl()
successor=self.software_instance.getRelativeUrl(),
follow_up_value=self.project
)
self.instance_tree.validate()
self.portal.portal_workflow._jumpToStateFor(self.instance_tree, 'start_requested')
......@@ -907,13 +914,14 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflowTransfer(SlapOSTestCaseMixin):
source_reference=self.request_kw['software_type'],
text_content=self.request_kw['instance_xml'],
sla_xml=self.request_kw['sla_xml'],
specialise=self.instance_tree.getRelativeUrl()
specialise=self.instance_tree.getRelativeUrl(),
follow_up_value=self.project
)
self.portal.portal_workflow._jumpToStateFor(self.software_instance, 'start_requested')
self.software_instance.validate()
self.tic()
person_user = self.makePerson()
person_user = self.makePerson(self.project)
self.tic()
# Login as new user
......@@ -956,7 +964,7 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflowTransfer(SlapOSTestCaseMixin):
destination_project=None)
self.login()
other_user = self.makePerson(user=1)
other_user = self.makePerson(self.project, user=1)
self.assertEqual(1 , len(other_user.objectValues(portal_type="ERP5 Login")))
self.instance_tree.setDestinationSectionValue(destination_section)
......
......@@ -6,12 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSCloudInstanceSlapInterfaceWorkflow</string> </value>
......@@ -61,28 +55,13 @@
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<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>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -95,7 +74,7 @@
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -104,7 +83,7 @@
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</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