diff --git a/tests/foreman/ui/test_subscription.py b/tests/foreman/ui/test_subscription.py index 5927bffebb7..19a14c8f13f 100644 --- a/tests/foreman/ui/test_subscription.py +++ b/tests/foreman/ui/test_subscription.py @@ -205,10 +205,11 @@ def test_positive_access_with_non_admin_user_with_manifest( default_organization=org, ).create() with target_sat.ui_session(test_name, user=user.login, password=user_password) as session: - assert ( - session.subscription.search(f'name = "{DEFAULT_SUBSCRIPTION_NAME}"')[0]['Name'] - == DEFAULT_SUBSCRIPTION_NAME - ) + all_subscriptions = session.subscription.read_subscriptions() + assert len(all_subscriptions) > 0 + assert any( + [sub['Name'] == DEFAULT_SUBSCRIPTION_NAME for sub in all_subscriptions] + ), 'Default subsciption not found' @pytest.mark.tier2