From 4a2d9446fa5500cef094505747c294f987ddf606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Va=C5=A1ina?= Date: Wed, 18 Sep 2024 09:09:21 +0200 Subject: [PATCH] Fix hostCollection install tests (#16379) (cherry picked from commit 6dbc7564655a7e47bdfcc2b73d93aabc768ed2ba) --- tests/foreman/ui/test_hostcollection.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/foreman/ui/test_hostcollection.py b/tests/foreman/ui/test_hostcollection.py index 795da0557db..2c37a2ab4e6 100644 --- a/tests/foreman/ui/test_hostcollection.py +++ b/tests/foreman/ui/test_hostcollection.py @@ -252,7 +252,7 @@ def test_positive_end_to_end(module_target_sat, module_org_with_parameter, smart @pytest.mark.tier2 def test_negative_install_via_remote_execution( - session, module_target_sat, module_org_with_parameter, smart_proxy_location + module_target_sat, module_org_with_parameter, smart_proxy_location ): """Test basic functionality of the Hosts collection UI install package via remote execution. @@ -274,7 +274,8 @@ def test_negative_install_via_remote_execution( host_collection = module_target_sat.api.HostCollection( host=[host.id for host in hosts], organization=module_org_with_parameter ).create() - with session: + with module_target_sat.ui_session() as session: + session.organization.select(module_org_with_parameter.name) session.location.select(smart_proxy_location.name) job_values = session.hostcollection.manage_packages( host_collection.name, @@ -290,7 +291,7 @@ def test_negative_install_via_remote_execution( @pytest.mark.tier2 def test_negative_install_via_custom_remote_execution( - session, module_target_sat, module_org_with_parameter, smart_proxy_location + module_target_sat, module_org_with_parameter, smart_proxy_location ): """Test basic functionality of the Hosts collection UI install package via remote execution - customize first. @@ -312,7 +313,8 @@ def test_negative_install_via_custom_remote_execution( host_collection = module_target_sat.api.HostCollection( host=[host.id for host in hosts], organization=module_org_with_parameter ).create() - with session: + with module_target_sat.ui_session() as session: + session.organization.select(module_org_with_parameter.name) session.location.select(smart_proxy_location.name) job_values = session.hostcollection.manage_packages( host_collection.name,