fastmcp/tests/server/auth/conftest.py
sui-ni2 3820f87b14
fix(auth): cache OIDC discovery configuration (#4861)
Co-authored-by: nate nowack <thrast36@gmail.com>
2026-09-22 10:56:31 -05:00

13 lines
373 B
Python

"""Shared fixtures for authentication tests."""
import pytest
from fastmcp.server.auth.oidc_proxy import _clear_oidc_configuration_cache
@pytest.fixture(autouse=True)
def clear_oidc_discovery_cache():
"""Prevent process-local discovery cache state from leaking between tests."""
_clear_oidc_configuration_cache()
yield
_clear_oidc_configuration_cache()