from narval.public import AL_NS plan = get_plan(memory) # check plan state assert plan.state == 'done' # check steps'state assert plan.elements['step1'].state == 'history' assert plan.elements['step2'].state == 'done' elements = list(get_elements(memory)) assert len(elements) == 4, elements # 1 in memory, 1 produced by step1 and 2 by step2 for elmt in elements: if elmt.el_id and elmt.from_step == 'step2': break else: raise AssertionError('Step 2 element has not been taken from memory')