Commit 93063634 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[test] Fix command line test: changes in API of get_transitions_from_model_file

parent cca016e3
...@@ -277,9 +277,17 @@ def convert_solutions_to_json(sol_steps, transitions, conditions=True): ...@@ -277,9 +277,17 @@ def convert_solutions_to_json(sol_steps, transitions, conditions=True):
# Get transitions for the given event # Get transitions for the given event
# Structure of transitions: # Structure of transitions:
# {u'h00': [('Ax', 'n1', {u'label': u'h00[]'}),] # {u'h00': [('Ax', 'n1', {u'label': u'h00[]'}),]
LOGGER.debug("convert_solutions_to_json:: %s", transitions) step_event = transitions.get(event, None)
step_event = transitions[event]
if not step_event: if not step_event:
LOGGER.error(
"convert_solutions_to_json:: event not found in the "
"transitions of the model: %s",
event
)
LOGGER.error(
"convert_solutions_to_json:: transitions: %s",
transitions
)
decomp_event['event'] = "ERROR, no transition" decomp_event['event'] = "ERROR, no transition"
else: else:
# Get list of transitions # Get list of transitions
......
...@@ -191,7 +191,7 @@ def test_convert_solutions_to_json(raw_feed_output, simulate_mac_complete_file): ...@@ -191,7 +191,7 @@ def test_convert_solutions_to_json(raw_feed_output, simulate_mac_complete_file):
fd_model_name = raw_feed_output[0] fd_model_name = raw_feed_output[0]
# Get transitions from the model # Get transitions from the model
model_transitions = get_transitions_from_model_file(fd_model_name) model_transitions, _ = get_transitions_from_model_file(fd_model_name)
decomp_solutions = convert_solutions_to_json( decomp_solutions = convert_solutions_to_json(
load_solutions(simulate_mac_complete_file), load_solutions(simulate_mac_complete_file),
model_transitions, model_transitions,
......
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