Commit c9049e41 authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: SimulationMovement_buildSlapOS search by specialise

parent 51a93e8d
......@@ -198,13 +198,15 @@ class TestSlapOSTriggerBuildAlarm(SlapOSTestCaseMixin):
root_applied_rule = self.portal.portal_simulation.newContent(
portal_type='Applied Rule')
simulation_movement = root_applied_rule.newContent(
causality=root_business_link.getRelativeUrl(),
causality_value=root_business_link,
specialise_value=business_process,
ledger='automated',
portal_type='Simulation Movement')
applied_rule = simulation_movement.newContent(portal_type='Applied Rule')
lower_simulation_movement = applied_rule.newContent(
causality=business_link.getRelativeUrl(),
causality_value=business_link,
specialise_value=business_process,
ledger='automated',
portal_type='Simulation Movement')
......@@ -225,15 +227,18 @@ class TestSlapOSTriggerBuildAlarm(SlapOSTestCaseMixin):
self.assertEqual([{
'recmethod': 'build',
'recargs': (),
'reckwargs': {'path': '%s/%%' % root_applied_rule.getPath(),
'activate_kw': {'tag': 'root_tag'}}}],
'reckwargs': {
'ledger__uid': self.portal.portal_categories.ledger.automated.getUid(),
'specialise__uid': business_process.getUid(),
'activate_kw': {'tag': 'root_tag'}
}}],
build_value
)
self.assertEqual([{
'recmethod': 'activate',
'recargs': (),
'reckwargs': {'tag': 'build_in_progress_%s_%s' % (
root_business_link.getUid(), root_applied_rule.getUid()),
root_business_link.getUid(), business_process.getUid()),
'after_tag': 'root_tag', 'activity': 'SQLQueue'}}],
activate_value)
......@@ -247,15 +252,18 @@ class TestSlapOSTriggerBuildAlarm(SlapOSTestCaseMixin):
self.assertEqual([{
'recmethod': 'build',
'recargs': (),
'reckwargs': {'path': '%s/%%' % root_applied_rule.getPath(),
'activate_kw': {'tag': 'lower_tag'}}}],
'reckwargs': {
'ledger__uid': self.portal.portal_categories.ledger.automated.getUid(),
'specialise__uid': business_process.getUid(),
'activate_kw': {'tag': 'lower_tag'}
}}],
build_value
)
self.assertEqual([{
'recmethod': 'activate',
'recargs': (),
'reckwargs': {'tag': 'build_in_progress_%s_%s' % (
business_link.getUid(), root_applied_rule.getUid()),
business_link.getUid(), business_process.getUid()),
'after_tag': 'lower_tag', 'activity': 'SQLQueue'}}],
activate_value)
......
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