| Total Complexity | 6 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import pytest |
||
| 2 | |||
| 3 | from oval_graph.command_line_client.client import Client |
||
| 4 | |||
| 5 | from .constants_for_tests import PATH_TO_ARF_REPORT |
||
| 6 | |||
| 7 | |||
| 8 | def get_client(rule, optional_args=None): |
||
| 9 | path = str(PATH_TO_ARF_REPORT) |
||
| 10 | args = [path, rule] |
||
| 11 | if optional_args is not None: |
||
| 12 | args.extend(optional_args) |
||
| 13 | return Client(args) |
||
| 14 | |||
| 15 | |||
| 16 | def test_search_rules_id_not_implemented_error(): |
||
| 17 | part_of_id_rule = 'xccdf_org.ssgproject.' |
||
| 18 | client = get_client(part_of_id_rule) |
||
| 19 | with pytest.raises(NotImplementedError): |
||
| 20 | assert client.search_rules_id() |
||
| 21 | |||
| 22 | |||
| 23 | def test_get_only_fail_rules_not_implemented_error(): |
||
| 24 | part_of_id_rule = 'xccdf_org.ssgproject.' |
||
| 25 | client = get_client(part_of_id_rule) |
||
| 26 | with pytest.raises(NotImplementedError): |
||
| 27 | assert client.get_only_fail_rule(['rule-id']) |
||
| 28 |