Passed
Pull Request — master (#156)
by Jan
06:11
created

ArfToHtml.prepare_parser()   A

Complexity

Conditions 1

Size

Total Lines 4
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nop 1
dl 0
loc 4
ccs 4
cts 4
cp 1
crap 1
rs 10
c 0
b 0
f 0
1 1
from ..converter import Converter
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2 1
from .client_arf_input import ClientArfInput
3 1
from .client_html_output import ClientHtmlOutput
4
5
6 1
class ArfToHtml(ClientArfInput, ClientHtmlOutput):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
7 1
    def _get_message(self):
8 1
        return {
9
            'description': 'Client for visualization of SCAP rule evaluation results',
10
            'source_filename': 'ARF scan file',
11
        }
12
13 1
    def create_dict_of_rule(self, rule_id):
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
14 1
        converter = Converter(self.arf_xml_parser.get_oval_tree(rule_id))
15 1
        return converter.to_JsTree_dict(self.hide_passing_tests)
16
17 1
    def _put_to_dict_oval_trees(self, dict_oval_trees, rule):
18 1
        dict_oval_trees[rule] = self.create_dict_of_rule(rule)
19
20 1
    def prepare_parser(self):
21 1
        super().prepare_parser()
22 1
        self.prepare_args_when_output_is_html()
23
        self.prepare_args_when_user_can_list_in_rules()
24