docs: 文档重构 — 清理 AI agent 残留,整合 docs/ 目录结构
- 删除 11 个残留文件: continuation.md, init_plan.md, reasonix.toml, djapi/continuation.md, djapi/.serena/, djapi/.claude/, djapi/.mcp.json, .claude/skills/, docs/usage.html, docs/db_schema.md, docs/report_db_design.md - 7 个 CLAUDE-*.md 移入 docs/ 并重命名去 CLAUDE- 前缀 - 新增 4 个文档: architecture.md, development.md, api.md, deployment.md - 重写 usage.md, README.md - 修复所有过时引用和交叉链接
This commit is contained in:
@@ -122,6 +122,17 @@ class NewsEventsAPITest(TestCase):
|
||||
self.assertEqual(kwargs['report_type'], 'intl')
|
||||
self.assertEqual(kwargs['section'], 'intl')
|
||||
|
||||
@patch('api.report.query.fetch_important_events',
|
||||
return_value=[{'id': 1, 'title': 'x', 'source': 'yicai',
|
||||
'sources': ['yicai', 'stcn']}])
|
||||
def test_sources_field_passthrough(self, mock_fetch):
|
||||
"""事件聚合响应原样透传 sources(JSON 数组)"""
|
||||
resp = self.client.get(self.url)
|
||||
self.assertEqual(resp.status_code, 200)
|
||||
body = resp.json()
|
||||
self.assertEqual(body[0]['sources'], ['yicai', 'stcn'])
|
||||
self.assertEqual(body[0]['source'], 'yicai')
|
||||
|
||||
def test_invalid_days(self):
|
||||
resp = self.client.get(self.url, {'days': 'abc'})
|
||||
self.assertEqual(resp.status_code, 400)
|
||||
|
||||
Reference in New Issue
Block a user