Commit fd7d4727 authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: TestSlapOSVirtualMasterScenarioMixin

parent c588bb8d
......@@ -8,7 +8,7 @@
from erp5.component.test.SlapOSTestCaseDefaultScenarioMixin import DefaultScenarioMixin
# from DateTime import DateTime
class TestSlapOSVirtualMasterScenario(DefaultScenarioMixin):
class TestSlapOSVirtualMasterScenarioMixin(DefaultScenarioMixin):
def requestRemoteNode(self, project, remote_project, remote_person):
remote_node = self.portal.compute_node_module.newContent(
......@@ -79,6 +79,20 @@ class TestSlapOSVirtualMasterScenario(DefaultScenarioMixin):
if not_consistent_document is not None:
assert not_consistent_document.checkConsistency() == [], not_consistent_document.checkConsistency()[0]
def addInstanceNode(self, title, software_instance):
instance_node = self.portal.compute_node_module.newContent(
portal_type='Instance Node',
title=title,
specialise_value=software_instance,
follow_up_value=software_instance.getFollowUpValue()
)
instance_node.validate()
return instance_node
class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
def test_virtual_master_without_accounting_scenario(self):
# create a default project
project = self.addProject()
......@@ -379,17 +393,6 @@ class TestSlapOSVirtualMasterScenario(DefaultScenarioMixin):
assert last_message is None, last_message
def addInstanceNode(self, title, software_instance):
instance_node = self.portal.compute_node_module.newContent(
portal_type='Instance Node',
title=title,
specialise_value=software_instance,
follow_up_value=software_instance.getFollowUpValue()
)
instance_node.validate()
return instance_node
def test_virtual_master_slave_without_accounting_scenario(self):
# create a default project
project = self.addProject()
......
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