From e3bef3058fe1f74e10bbc5cb1a0bc66724bd39d1 Mon Sep 17 00:00:00 2001 From: Yeonu-Kim Date: Mon, 22 Jun 2026 14:10:04 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20test=EC=8B=9C=20=EC=8B=A4?= =?UTF-8?q?=EC=A0=9C=20=EC=9D=B4=EB=A9=94=EC=9D=BC=EC=9D=B4=20=EB=B0=9C?= =?UTF-8?q?=EC=86=A1=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/conftest.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 42e621d..c68927d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,6 @@ -from collections.abc import AsyncGenerator +from collections.abc import AsyncGenerator, Generator from datetime import UTC, datetime, timedelta +from unittest.mock import AsyncMock, patch from uuid import UUID import pytest @@ -26,6 +27,12 @@ DATABASE_URL = "sqlite+aiosqlite:///:memory:" +@pytest.fixture(autouse=True) +def mock_send_email() -> Generator[AsyncMock, None, None]: + with patch("app.core.email.send_email", new_callable=AsyncMock) as mock: + yield mock + + @pytest.fixture async def engine() -> AsyncGenerator[AsyncEngine, None]: _engine = create_async_engine(