From 807e8bb5d7a7373d6605b945e0916e201a1f2d0a Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Thu, 7 Dec 2023 14:11:19 -0500 Subject: [PATCH] [6.12.z] Update error message in negative settings test (#13309) Update error message in negative settings test (#13307) Signed-off-by: Gaurav Talreja (cherry picked from commit 9af01c78c98e5afcd5c13540ea2f4e2c5dc0c64d) Co-authored-by: Gaurav Talreja --- tests/foreman/ui/test_settings.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/foreman/ui/test_settings.py b/tests/foreman/ui/test_settings.py index a70a930e648..d8458170de6 100644 --- a/tests/foreman/ui/test_settings.py +++ b/tests/foreman/ui/test_settings.py @@ -122,7 +122,7 @@ def test_positive_httpd_proxy_url_update(session, setting_update): @pytest.mark.tier2 -@pytest.mark.parametrize('setting_update', ['foreman_url', 'entries_per_page'], indirect=True) +@pytest.mark.parametrize('setting_update', ['foreman_url'], indirect=True) def test_negative_validate_foreman_url_error_message(session, setting_update): """Updates some settings with invalid values (an exceptional tier2 test) @@ -137,9 +137,10 @@ def test_negative_validate_foreman_url_error_message(session, setting_update): property_name = setting_update.name with session: invalid_value = [invalid_value for invalid_value in invalid_settings_values()][0] + err_msg = 'URL must be valid and schema must be one of http and https, Invalid HTTP(S) URL' with pytest.raises(AssertionError) as context: session.settings.update(f'name = {property_name}', invalid_value) - assert 'Value is invalid: must be integer' in str(context.value) + assert err_msg in str(context.value) @pytest.mark.tier2