Files
AlphaPulse/backend/tests/conftest.py
T
eezd 285b3952d7 Support selectable demo exchanges and configurable analysis limits
Persist manual requests until exchange confirmation, preserve stop protection, and reconcile fills before settling plans. Tighten model stream, crawler, skill, research accounting, and frontend race handling, with regression coverage. Keep queued analyses pending until a fresh account snapshot is available.
2026-10-20 18:45:00 +08:00

15 lines
552 B
Python

import pytest
@pytest.fixture
def trading(monkeypatch):
# 测试只替换 I/O 边界,不读取项目凭证,也不连接线上数据库或 Redis。
for key, value in {
"DATABASE_URL": "postgresql+asyncpg://test:[email protected]/test",
"REDIS_URL": "redis://127.0.0.1:1/0", "JWT_SECRET": "test-only",
"ADMIN_USERNAME": "test", "SECRET_ENCRYPTION_KEY": "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=",
}.items():
monkeypatch.setenv(key, value)
from alphapulse.trading import executor
return executor