From 44591daab44d3dea884cdc8a032752bdf700c708 Mon Sep 17 00:00:00 2001 From: yanpliu Date: Mon, 5 Feb 2024 08:20:33 -0500 Subject: [PATCH] Fix virtwho UI cases failed for _GeneratorContextManager object has no attribute virtwho_configure (#13981) * Fix virtwho UI cases failed for _GeneratorContextManager object has no attribute virtwho_configure * pre-check --- tests/foreman/virtwho/conftest.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/foreman/virtwho/conftest.py b/tests/foreman/virtwho/conftest.py index 9b09a66c0fa..a83875fe130 100644 --- a/tests/foreman/virtwho/conftest.py +++ b/tests/foreman/virtwho/conftest.py @@ -49,7 +49,10 @@ def test_foo(session): # your ui test steps here session.architecture.create({'name': 'bar'}) """ - return module_target_sat.ui_session(test_name, module_user.login, module_user.password) + with module_target_sat.ui_session( + test_name, module_user.login, module_user.password + ) as session: + return session @pytest.fixture(scope='module') @@ -96,4 +99,7 @@ def test_foo(session): # your ui test steps here session.architecture.create({'name': 'bar'}) """ - return module_target_sat.ui_session(test_name, module_user_sca.login, module_user_sca.password) + with module_target_sat.ui_session( + test_name, module_user_sca.login, module_user_sca.password + ) as session_sca: + return session_sca