Commit c27a7ac5 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: project needed in test

parent 9901d558
......@@ -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)
......
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