This is an automated email from the ASF dual-hosted git repository. aminghadersohi pushed a commit to branch research-mcp-hello-page in repository https://gitbox.apache.org/repos/asf/superset.git
commit cb212db2bcb402c3c6b506c8343ab22e52248127 Author: Amin Ghadersohi <[email protected]> AuthorDate: Thu May 21 01:15:53 2026 +0000 fix(tests): update test_jwt_verifier to import _auth_error_handler The PR renamed _json_auth_error_handler to _auth_error_handler in jwt_verifier.py (to reflect that it now returns HTML for browsers rather than always JSON), but test_jwt_verifier.py still imported the old name, causing a collection-time ImportError that failed all unit tests. --- tests/unit_tests/mcp_service/test_jwt_verifier.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit_tests/mcp_service/test_jwt_verifier.py b/tests/unit_tests/mcp_service/test_jwt_verifier.py index b6ba58aa7f2..0eb934696bc 100644 --- a/tests/unit_tests/mcp_service/test_jwt_verifier.py +++ b/tests/unit_tests/mcp_service/test_jwt_verifier.py @@ -26,7 +26,7 @@ import pytest from authlib.jose.errors import BadSignatureError, DecodeError, ExpiredTokenError from superset.mcp_service.jwt_verifier import ( - _json_auth_error_handler, + _auth_error_handler, _jwt_failure_reason, DetailedBearerAuthBackend, DetailedJWTVerifier, @@ -400,7 +400,7 @@ def test_get_middleware_returns_custom_components(hs256_verifier): == "DetailedBearerAuthBackend" ) # on_error should be the RFC 6750-compliant generic handler - assert auth_middleware.kwargs["on_error"] is _json_auth_error_handler + assert auth_middleware.kwargs["on_error"] is _auth_error_handler class _FakeHeaders(dict[str, str]): @@ -496,7 +496,7 @@ def test_error_handler_never_leaks_jwt_details(): for reason in sensitive_reasons: exc = AuthenticationError(reason) - response = _json_auth_error_handler(mock_conn, exc) + response = _auth_error_handler(mock_conn, exc) assert response.status_code == 401
