更新了部分测试

This commit is contained in:
strepsiades
2026-03-24 09:25:37 +08:00
parent b51ed0175b
commit 7d92b3f1fe
19 changed files with 115 additions and 200 deletions
@@ -65,9 +65,9 @@ class ApiDataSource(BaseDataSource):
"""关闭数据源(关闭 HTTP 客户端)"""
await self.client.close()
def register_handler(self, handler: NodeHandler) -> None:
def add_handler(self, handler: NodeHandler) -> None:
"""
注册业务 Handler
添加业务 Handler
Args:
handler: API Handler 实例
@@ -75,8 +75,8 @@ class ApiDataSource(BaseDataSource):
handler.set_api_client(self.client)
handler.set_poll_mode(self.poll_mode)
# 调用基类注册方法
super().register_handler(handler)
# 调用基类添加方法
super().add_handler(handler)
# 如果 collection 已设置,确保新 handler 拿到引用
if self._collection is not None: