From 8ce2a04857efd6368d175c019d2ed566f172bd30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hellebrandt?= Date: Thu, 12 Dec 2024 13:31:30 +0100 Subject: [PATCH] Only the second call should raise an exception (#17149) (cherry picked from commit 8c12788a27c48760d1ce47c58f78f7c52af69b9a) --- tests/foreman/destructive/test_ldap_authentication.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/foreman/destructive/test_ldap_authentication.py b/tests/foreman/destructive/test_ldap_authentication.py index c5a82bff6fa..4f3f1934546 100644 --- a/tests/foreman/destructive/test_ldap_authentication.py +++ b/tests/foreman/destructive/test_ldap_authentication.py @@ -424,8 +424,7 @@ def test_login_failure_rhsso_user_if_internal_user_exist( 'password': settings.rhsso.rhsso_password, } with module_target_sat.ui_session(login=False) as rhsso_session: - with pytest.raises(NavigationTriesExceeded) as error: - rhsso_session.rhsso_login.login(login_details) + rhsso_session.rhsso_login.login(login_details) with pytest.raises(NavigationTriesExceeded) as error: rhsso_session.task.read_all() assert error.typename == 'NavigationTriesExceeded'