
plan = get_plan(memory)

# check plan state
assert_equals(plan.state, 'done')
# check steps'state
assert_equals(plan.elements['step1'].state, 'done')

# check generated elements
elements = list(get_elements(memory))
assert_equals(len(elements), 3, len(elements)) # 1 existant, 1 imported from arguments, 1 produced
produced_elmts = [elmt for elmt in elements if elmt.identity]
assert_equals(len(produced_elmts), 1)
assert_equals(produced_elmts[0].flag, 'spam')

