chore: update gitignore; feat: 新增customer_agent业务模块与api路由

This commit is contained in:
2026-09-11 11:02:15 +08:00
parent 5915319f9f
commit 2004b8fcf4
59 changed files with 3527 additions and 18 deletions
+22
View File
@@ -0,0 +1,22 @@
import unittest
from unittest.mock import AsyncMock
from rag.events import publish_knowledge_update
class KnowledgeEventTests(unittest.IsolatedAsyncioTestCase):
async def test_publishes_update_event_after_successful_ingestion(self):
publisher = AsyncMock()
await publish_knowledge_update(
publisher, doc_id="doc-1", collection_name="fin_faq", chunk_count=4
)
publisher.assert_awaited_once_with(
"event:knowledge_update",
{"doc_id": "doc-1", "collection_name": "fin_faq", "chunk_count": 4},
)
if __name__ == "__main__":
unittest.main()