def test_get_actions_singleaction(singleparagraph_html_tree): # construct input html_tree, p_el = singleparagraph_html_tree step_div_el = add_action_div(p_el, '1', 'test_step') step_div_el.text = "This is a test step" result_div_el = add_action_div(p_el, '1', 'test_result') result_div_el.text = "This is the expected result." # construct expected output exp_res = [ (1, "test_step", step_div_el), (1, "test_result", result_div_el), ] # run, run actions = export.get_actions(html_tree) # checking assert actions == exp_res
def test_get_actions_empty(empty_html_tree): assert export.get_actions(empty_html_tree) == []