Files
group_fqcd_jr/tests/integration/conftest.py
T

18 lines
588 B
Python
Raw Normal View History

2026-09-11 16:57:47 +08:00
from __future__ import annotations
import pytest
from app.core.config import get_settings
@pytest.fixture(autouse=True)
def isolate_offsite_runtime_settings(monkeypatch: pytest.MonkeyPatch) -> None:
"""让集成测试使用固定角色,不受本机真实邮箱配置影响。"""
settings = get_settings().model_copy(
update={
"offsite_allowed_senders": ("15008108550@163.com",),
2026-09-14 18:13:10 +08:00
"offsite_mail_return_receiver": "yuan80818843@163.com",
2026-09-11 16:57:47 +08:00
}
)
monkeypatch.setattr("app.service.offsite_fund_service.get_settings", lambda: settings)