feat(market-data): 优化同步并增加完整性检查
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import pytest
|
||||
from pydantic import ValidationError
|
||||
|
||||
from zhixing_server.bootstrap.config import Settings
|
||||
|
||||
|
||||
def test_market_data_workers_default_to_eight(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
monkeypatch.delenv("ZHIXING_MARKET_DATA_MAX_WORKERS", raising=False)
|
||||
settings = Settings()
|
||||
|
||||
assert settings.market_data_max_workers == 8
|
||||
|
||||
|
||||
def test_market_data_workers_must_be_positive() -> None:
|
||||
with pytest.raises(ValidationError):
|
||||
Settings(market_data_max_workers=0)
|
||||
Reference in New Issue
Block a user