fix: add autouse fixture to clear dependency_overrides after each test
This commit is contained in:
parent
c349e40fde
commit
7bbc977175
|
|
@ -26,6 +26,14 @@ pytest_plugins = [
|
|||
]
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _cleanup_dependency_overrides():
|
||||
"""Ensure dependency_overrides are cleaned up after each test."""
|
||||
from app.main import app
|
||||
yield
|
||||
app.dependency_overrides.clear()
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def add_api_key_filter():
|
||||
root_logger = logging.getLogger()
|
||||
|
|
|
|||
Loading…
Reference in New Issue