P0 修复: - runtimeStore: 添加缺失的 lastDayHistory 字段 - Gateway/RuntimeService: 状态同步改为内存优先,消除 glob 竞态 - App.jsx: 从 3075 行重构到 ~500 行,提取 8 个独立文件 P1 修复: - CORS: 4 个服务改为从环境变量读取允许 origins - MarketStore: 改为模块级单例模式 - Domain 层: 删除 trading thin wrapper,保留 news 真实逻辑 - 测试: 补齐 77 个 gateway/runtime 测试 新增文件: - backend/tests/test_gateway.py (43 tests) - frontend/src/hooks/useWebSocketHandler.js - frontend/src/hooks/useStockRequestCallbacks.js - frontend/src/hooks/useAgentCallbacks.js - frontend/src/hooks/useRuntimeCallbacks.js - frontend/src/hooks/useWatchlistCallbacks.js - frontend/src/components/TickerBar.jsx - frontend/src/components/HeaderRight.jsx - frontend/src/components/ChartTabs.jsx Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 lines
624 B
Python
22 lines
624 B
Python
# -*- coding: utf-8 -*-
|
|
"""Unit tests for data_tools functions (replaces the deleted trading_domain)."""
|
|
|
|
from backend.tools.data_tools import (
|
|
get_company_news,
|
|
get_financial_metrics,
|
|
get_insider_trades,
|
|
get_market_cap,
|
|
get_prices,
|
|
search_line_items,
|
|
)
|
|
|
|
|
|
def test_data_tools_functions_exist():
|
|
"""Verify that all data_tools functions are importable and callable."""
|
|
assert callable(get_prices)
|
|
assert callable(get_financial_metrics)
|
|
assert callable(get_company_news)
|
|
assert callable(get_insider_trades)
|
|
assert callable(get_market_cap)
|
|
assert callable(search_line_items)
|