def test_param_xml(): detection = Detection(examples_path, '.') frame_data = {} language_data = {} tree = detection.rule() root = tree.getroot() frame_data, language_data = detection.parse_xml(root, frame_data, language_data) assert 'WordPress' in frame_data assert 'php' in language_data
def test_rule(): detection = Detection(examples_path, '.') root = eT.ElementTree(file=examples_path + '/param_xml.xml') tree = detection.rule() assert type(root) is type(tree)
def test_rule(): detection = Detection(examples_path, '.') root = eT.ElementTree(file=examples_path+'/param_xml.xml') tree = detection.rule() assert type(root) is type(tree)