Commit 61c5d678 authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: test: there is no causality_state anymore on instance tree

parent 094460ae
......@@ -124,56 +124,3 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by D
portal_type = "Sale Invoice Transaction"
self._test_calculate(new_id, newContent, portal_type=portal_type,
start_date='2011/01/01')
def test_InstanceTree_changePromise(self):
new_id = self.generateNewId()
project = self.addProject()
subscription = self.portal.instance_tree_module.newContent(
portal_type='Instance Tree',
title="Subscription %s" % new_id,
reference="TESTSUB-%s" % new_id,
follow_up_value=project
)
subscription.validate()
self.assertEqual(subscription.getCausalityState(), 'diverged')
request_kw = dict(
software_release='http://example.org',
software_type='http://example.org',
instance_xml=self.generateSafeXml(),
sla_xml=self.generateSafeXml(),
shared=False,
)
subscription.requestStart(**request_kw)
subscription.converge()
self.assertEqual(subscription.getCausalityState(), 'solved')
subscription.requestDestroy(**request_kw)
self.assertEqual(subscription.getCausalityState(), 'diverged')
def test_InstanceTree_changePromiseInDivergedState(self):
new_id = self.generateNewId()
project = self.addProject()
subscription = self.portal.instance_tree_module.newContent(
portal_type='Instance Tree',
title="Subscription %s" % new_id,
reference="TESTSUB-%s" % new_id,
follow_up_value=project
)
subscription.validate()
request_kw = dict(
software_release='http://example.org',
software_type='http://example.org',
instance_xml=self.generateSafeXml(),
sla_xml=self.generateSafeXml(),
shared=False,
)
subscription.requestStart(**request_kw)
self.assertEqual(subscription.getCausalityState(), 'diverged')
subscription.requestDestroy(**request_kw)
self.assertEqual(subscription.getCausalityState(), 'diverged')
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