From aee9cd6a52cd0052975ecff35985a1ce92a820c4 Mon Sep 17 00:00:00 2001 From: amolpati30 <151733635+amolpati30@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:02:27 +0530 Subject: [PATCH] create report template w/o name (#14035) (cherry picked from commit a1e5eaf3ce9f340a80e1058e58ce395950f6173f) --- tests/foreman/api/test_reporttemplates.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/foreman/api/test_reporttemplates.py b/tests/foreman/api/test_reporttemplates.py index 3c3bf97658e..497c27feefe 100644 --- a/tests/foreman/api/test_reporttemplates.py +++ b/tests/foreman/api/test_reporttemplates.py @@ -357,8 +357,7 @@ def test_positive_generate_report_sanitized(): @pytest.mark.tier2 -@pytest.mark.stubbed -def test_negative_create_report_without_name(): +def test_negative_create_report_without_name(module_target_sat): """Try to create a report template with empty name :id: a4b577db-144e-4771-a42e-e93887464986 @@ -373,6 +372,9 @@ def test_negative_create_report_without_name(): :CaseImportance: Medium """ + with pytest.raises(HTTPError) as report_response: + module_target_sat.api.ReportTemplate(name=' ', template=gen_string('alpha')).create() + assert "Name can't be blank" in report_response.value.response.text @pytest.mark.tier2