Code Duplication    Length = 15-16 lines in 2 locations

tests_oval_graph/test_commands/test_command_bad_arf.py 2 locations

@@ 17-32 (lines=16) @@
14
                         ]
15
16
17
@pytest.mark.parametrize("command_name", ['arf-to-graph', 'arf-to-json'])
18
def test_command_with_bad_arf_file_with_verbose(command_name):
19
    command = [
20
        *COMMAND_START,
21
        command_name,
22
        '-v',
23
        'tests/test_data/xccdf_org.ssgproject.content_profile_ospp-results-initial.xml',
24
        '.'
25
    ]
26
    out = subprocess.check_output(
27
        command,
28
        stderr=subprocess.STDOUT)
29
    out_string = out.decode('utf-8')
30
    assert out_string.find("Traceback") > -1
31
    assert out_string.find("Warning:") > -1
32
    assert out_string.find("Error:") > -1
33
34
35
@pytest.mark.parametrize("command_name", ['arf-to-graph', 'arf-to-json'])
@@ 35-49 (lines=15) @@
32
    assert out_string.find("Error:") > -1
33
34
35
@pytest.mark.parametrize("command_name", ['arf-to-graph', 'arf-to-json'])
36
def test_command_with_bad_arf_file(command_name):
37
    command = [
38
        *COMMAND_START,
39
        command_name,
40
        'tests/test_data/xccdf_org.ssgproject.content_profile_ospp-results-initial.xml',
41
        '.'
42
    ]
43
    out = subprocess.check_output(
44
        command,
45
        stderr=subprocess.STDOUT)
46
    out_string = out.decode('utf-8')
47
    assert out_string.find("Traceback") == -1
48
    assert out_string.find("Warning:") > -1
49
    assert out_string.find("Error:") > -1
50
51
52
def test_bad_command_json_to_graph_with_verbose():