Commit 3197b749 authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: SimulationMovement_buildSlapOS search by specialise

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