From 3a4aaefd43d0dfd523630160b5ac1e5a6db1217b Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Tue, 23 Jan 2024 05:47:08 -0500 Subject: [PATCH] [6.14.z] cli oscap fix name already taken (#13865) --- tests/foreman/cli/test_oscap.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/foreman/cli/test_oscap.py b/tests/foreman/cli/test_oscap.py index ecbc50f06de..c198e5fa636 100644 --- a/tests/foreman/cli/test_oscap.py +++ b/tests/foreman/cli/test_oscap.py @@ -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 @@ -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): @@ -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):