diff --git a/tests/foreman/ui/test_host.py b/tests/foreman/ui/test_host.py index 7a30946c183..6a28b3d7748 100644 --- a/tests/foreman/ui/test_host.py +++ b/tests/foreman/ui/test_host.py @@ -2420,7 +2420,7 @@ def test_positive_tracer_enable_reload(tracer_install_host, target_sat): @pytest.mark.tier2 -def test_all_hosts_delete(session, target_sat, default_org, default_location, new_host_ui): +def test_all_hosts_delete(session, target_sat, function_org, function_location, new_host_ui): """Create a host and delete it through All Hosts UI :id: 42b4560c-bb57-4c58-928e-e5fd5046b93f @@ -2433,8 +2433,10 @@ def test_all_hosts_delete(session, target_sat, default_org, default_location, ne :CaseLevel: System """ - host = target_sat.api.Host(organization=default_org, location=default_location).create() + host = target_sat.api.Host(organization=function_org, location=function_location).create() with target_sat.ui_session() as session: + session.organization.select(function_org.name) + session.location.select(function_location.name) session.all_hosts.delete(host.name) assert session.all_hosts.search(host.name) is None