Exemplo n.º 1
0
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
Exemplo n.º 2
0
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
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
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)