""""""
from narval.elements.test import Element
from narval.public import AL_NS
plan = get_plan(memory)

# check plan state
assert_equals(plan.state, 'done')

# check generated elements
elements = []
for elmt in memory:
    if isinstance(elmt, Element):
        elements.append(elmt)
assert_equals(len(elements), 2)
delay = abs(elements[0].timestamp - elements[1].timestamp)
assert delay > 1, delay
assert delay < 60, delay

# check transitions'state
assert_equals(plan.elements['transition1'].state, 'fired')
# check steps'state
assert_equals(plan.elements['step2'].state, 'done')

 
