Skip to content

Commit

Permalink
create report template w/o name (#14035)
Browse files Browse the repository at this point in the history
(cherry picked from commit a1e5eaf)
  • Loading branch information
amolpati30 authored and web-flow committed Feb 15, 2024
1 parent ef626ff commit 096ea24
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/foreman/api/test_reporttemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,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
Expand All @@ -364,6 +363,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
Expand Down

0 comments on commit 096ea24

Please sign in to comment.