diff --git a/src/labs/routers/auth/tasks.py b/src/labs/routers/auth/tasks.py index 279ae10..17824df 100644 --- a/src/labs/routers/auth/tasks.py +++ b/src/labs/routers/auth/tasks.py @@ -1,3 +1,7 @@ +from sqlalchemy.ext.asyncio import AsyncSession +from taskiq import TaskiqDepends + +from ...db import get_async_session from ...broker import broker @broker.task @@ -9,7 +13,9 @@ async def send_reset_password_email() -> None: pass @broker.task -async def send_account_verification_email() -> None: +async def send_account_verification_email( + session: AsyncSession = TaskiqDepends(get_async_session) +) -> None: import logging logging.error("Kicking off send_account_verification_email") diff --git a/src/labs/schema/auth.py b/src/labs/schema/auth.py index f170d57..a70e476 100644 --- a/src/labs/schema/auth.py +++ b/src/labs/schema/auth.py @@ -38,6 +38,7 @@ class OTPTriggerSMSRequest(AppBaseModel): class OTPVerifyRequest(AppBaseModel): """ OTP sent to the server to verify if it's valid """ otp: str + mobile_number: str class OTPTriggerResponse(AppBaseModel): """ OTP Verification result """ diff --git a/src/tests/__init__.py b/src/tests/__init__.py index 49c522c..aa484dc 100644 --- a/src/tests/__init__.py +++ b/src/tests/__init__.py @@ -1,7 +1,5 @@ """ - - """ diff --git a/src/tests/conftest.py b/src/tests/conftest.py new file mode 100644 index 0000000..a5fe919 --- /dev/null +++ b/src/tests/conftest.py @@ -0,0 +1,10 @@ +""" + +""" +import pytest + +@pytest.fixture(scope="module") +def test_client(): + from fastapi.testclient import TestClient + from labs.api import app + return TestClient(app) diff --git a/src/tests/test_auth.py b/src/tests/test_auth.py new file mode 100644 index 0000000..8c3e027 --- /dev/null +++ b/src/tests/test_auth.py @@ -0,0 +1,11 @@ +from fastapi.testclient import TestClient +from fastapi.security import OAuth2PasswordRequestForm + +from labs.schema.auth import Token + +def test_signup(): + assert 1 == 1 + + +def test_login(): + assert 1 == 1