diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-08-31 17:19:24 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-08-31 17:19:24 +0200 |
| commit | 51d2d734c228f1e46670962480258abfe586d6c4 (patch) | |
| tree | 12e869044c80c889f83b588210cc0ac500cd7a6a /packages/meshbay-hub/tests | |
| parent | f4c6628c8e85513d9fd110ead95682368a15a0fd (diff) | |
| parent | c6fd7ea89b6e0a96eb1d81989de891b4768b1044 (diff) | |
| download | meshbay-51d2d734c228f1e46670962480258abfe586d6c4.tar.gz | |
Merge branch 'feat/email-verification'
Diffstat (limited to 'packages/meshbay-hub/tests')
| -rw-r--r-- | packages/meshbay-hub/tests/conftest.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/meshbay-hub/tests/conftest.py b/packages/meshbay-hub/tests/conftest.py index 4593f86..bf96e3d 100644 --- a/packages/meshbay-hub/tests/conftest.py +++ b/packages/meshbay-hub/tests/conftest.py @@ -4,6 +4,7 @@ import os import pytest import pytest_asyncio from pathlib import Path +from unittest.mock import AsyncMock from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey from cryptography.hazmat.primitives import serialization @@ -84,3 +85,14 @@ async def db_session(app): from meshbay_hub.db.engine import get_session_factory async with get_session_factory()() as session: yield session + + +@pytest.fixture(autouse=True) +def _skip_email_verification(monkeypatch): + """Skip email verification in tests — users are active immediately.""" + async def _noop(db, user, email, eh): + pass + + monkeypatch.setattr( + "meshbay_hub.api.users._create_and_send_verification", _noop) + monkeypatch.setattr("meshbay_hub.mail._send", lambda msg: True) |