|
@@ 365-375 (lines=11) @@
|
| 362 |
|
e.value) == 'err- 404 rule not found!' |
| 363 |
|
|
| 364 |
|
|
| 365 |
|
def test_use_bat_report_file(): |
| 366 |
|
src = ('test_data/xccdf_org.ssgproject.content_rule_sssd_' + |
| 367 |
|
'ssh_known_hosts_timeout-comment.fail.sh-xccdf_or' + |
| 368 |
|
'g.ssgproject.content_profile_ospp-results-initial.xml') |
| 369 |
|
_dir = os.path.dirname(os.path.realpath(__file__)) |
| 370 |
|
FIXTURE_DIR = py.path.local(_dir) / src |
| 371 |
|
|
| 372 |
|
with pytest.raises(ValueError) as e: |
| 373 |
|
parser = graph.xml_parser.xml_parser(str(FIXTURE_DIR)) |
| 374 |
|
assert str( |
| 375 |
|
e.value) == 'err- This is not arf report file.' |
| 376 |
|
|
| 377 |
|
|
| 378 |
|
def test_get_rule_dict(): |
|
@@ 352-362 (lines=11) @@
|
| 349 |
|
src, test_data_src, rule_id) |
| 350 |
|
|
| 351 |
|
|
| 352 |
|
def test_get_def_id_by_rule_id(): |
| 353 |
|
src = 'test_data/ssg-fedora-ds-arf.xml' |
| 354 |
|
_dir = os.path.dirname(os.path.realpath(__file__)) |
| 355 |
|
FIXTURE_DIR = py.path.local(_dir) / src |
| 356 |
|
|
| 357 |
|
parser = graph.xml_parser.xml_parser(str(FIXTURE_DIR)) |
| 358 |
|
|
| 359 |
|
with pytest.raises(ValueError) as e: |
| 360 |
|
parser.get_def_id_by_rule_id('hello') |
| 361 |
|
assert str( |
| 362 |
|
e.value) == 'err- 404 rule not found!' |
| 363 |
|
|
| 364 |
|
|
| 365 |
|
def test_use_bat_report_file(): |