Skip to content

利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.

fix(controllers): register ping health check router

Nafees Madnif43721e82d4d
diff --git a/app/router.py b/app/router.py
index cf840374..3db93eee 100644
--- a/app/router.py
+++ b/app/router.py
@@ -1,4 +1,4 @@
-"""Application configuration - root APIRouter.
+"""Application configuration - root APIRouter
Defines all FastAPI application endpoints.
@@ -9,9 +9,12 @@ Resources:
from fastapi import APIRouter
+from app.controllers import ping
from app.controllers.v1 import llm, video
root_api_router = APIRouter()
+root_api_router.include_router(ping.router)
+
# v1
root_api_router.include_router(video.router)
root_api_router.include_router(llm.router)
diff --git a/test/services/test_controller_ping.py b/test/services/test_controller_ping.py
new file mode 100644
index 00000000..eb9ce581
--- /dev/null
+++ b/test/services/test_controller_ping.py
@@ -0,0 +1,14 @@
+import unittest
+
+from app.controllers import ping as ping_controller
+
+
+class TestPingController(unittest.TestCase):
+ def test_ping(self):
+ response = ping_controller.ping(None)
+
+ self.assertEqual(response, "pong")
+
+
+if __name__ == "__main__":
+ unittest.main()