|
@@ 93-106 (lines=14) @@
|
| 90 |
|
assert out[0]['choices'][2]['name'] == rule2 |
| 91 |
|
|
| 92 |
|
|
| 93 |
|
def test_get_questions_with_option_show_fail_rules(): |
| 94 |
|
src = 'test_data/ssg-fedora-ds-arf.xml' |
| 95 |
|
regex = r'_package_\w+_removed' |
| 96 |
|
client = get_client_with_option_show_fail_rules(src, regex) |
| 97 |
|
from PyInquirer import Separator |
| 98 |
|
|
| 99 |
|
out = client.get_questions( |
| 100 |
|
Separator('= The rules ID ='), |
| 101 |
|
Separator('= The not selected rules ID =')) |
| 102 |
|
rule1 = 'xccdf_org.ssgproject.content_rule_package_abrt_removed' |
| 103 |
|
print(out) |
| 104 |
|
assert out[0]['choices'][1]['name'] == rule1 |
| 105 |
|
with pytest.raises(Exception, match="list index out of range"): |
| 106 |
|
assert out[0]['choices'][2]['name'] is None |
| 107 |
|
|
| 108 |
|
|
| 109 |
|
def test_get_questions_with_option_show_fail_rules(): |
|
@@ 109-121 (lines=13) @@
|
| 106 |
|
assert out[0]['choices'][2]['name'] is None |
| 107 |
|
|
| 108 |
|
|
| 109 |
|
def test_get_questions_with_option_show_fail_rules(): |
| 110 |
|
src = 'test_data/ssg-fedora-ds-arf.xml' |
| 111 |
|
regex = r'_package_\w+_removed' |
| 112 |
|
client = get_client_with_option_show_fail_rules(src, regex) |
| 113 |
|
from PyInquirer import Separator |
| 114 |
|
|
| 115 |
|
out = client.get_questions( |
| 116 |
|
Separator('= The rules ID ='), |
| 117 |
|
Separator('= The not selected rules ID =')) |
| 118 |
|
rule1 = 'xccdf_org.ssgproject.content_rule_package_abrt_removed' |
| 119 |
|
assert out[0]['choices'][1]['name'] == rule1 |
| 120 |
|
with pytest.raises(Exception, match="list index out of range"): |
| 121 |
|
assert out[0]['choices'][2]['name'] is None |
| 122 |
|
|
| 123 |
|
|
| 124 |
|
def test_get_wanted_not_selected_rules(): |