Skip to content

Commit

Permalink
cli oscap fix name already taken (#13856)
Browse files Browse the repository at this point in the history
  • Loading branch information
pondrejk authored Jan 23, 2024
1 parent 22c4d59 commit 5e2585a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/foreman/cli/test_oscap.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,9 @@ def test_positive_create_scap_content_with_valid_originalfile_name(
:CaseImportance: Medium
"""
title = gen_string('alpha')
scap_content = module_target_sat.cli_factory.scapcontent(
{'original-filename': name, 'scap-file': settings.oscap.content_path}
{'original-filename': name, 'scap-file': settings.oscap.content_path, 'title': title}
)
assert scap_content['original-filename'] == name

Expand Down Expand Up @@ -406,8 +407,9 @@ def test_positive_delete_scap_content_with_id(self, module_target_sat):
:CaseImportance: Medium
"""
title = gen_string('alpha')
scap_content = module_target_sat.cli_factory.scapcontent(
{'scap-file': settings.oscap.content_path}
{'scap-file': settings.oscap.content_path, 'title': title}
)
module_target_sat.cli.Scapcontent.delete({'id': scap_content['id']})
with pytest.raises(CLIReturnCodeError):
Expand Down Expand Up @@ -436,8 +438,9 @@ def test_positive_delete_scap_content_with_title(self, module_target_sat):
:CaseImportance: Medium
"""
title = gen_string('alpha')
scap_content = module_target_sat.cli_factory.scapcontent(
{'scap-file': settings.oscap.content_path}
{'scap-file': settings.oscap.content_path, 'title': title}
)
module_target_sat.cli.Scapcontent.delete({'title': scap_content['title']})
with pytest.raises(CLIReturnCodeError):
Expand Down

0 comments on commit 5e2585a

Please sign in to comment.