Skip to content

Commit

Permalink
Fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskerPRC committed Sep 24, 2024
1 parent ad55f16 commit d3e06f4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
import pytest
from infra_ai_service.core.app import get_app # 确保从你的应用文件导入 get_app


@pytest.fixture
def client():
app = get_app()
with TestClient(app) as client:
yield client


def test_text_processing_routes(client):
"""
测试文本处理路由。
Expand All @@ -16,6 +18,7 @@ def test_text_processing_routes(client):
response = client.get("/api/text/process")
assert response.status_code == 405


def test_embedding_routes(client):
"""
测试嵌入向量路由。
Expand All @@ -24,6 +27,7 @@ def test_embedding_routes(client):
response = client.get("/api/embedding/embed")
assert response.status_code == 405


def test_vector_search_routes(client):
"""
测试向量搜索路由。
Expand All @@ -32,6 +36,7 @@ def test_vector_search_routes(client):
response = client.get("/api/search/query")
assert response.status_code == 405


def test_status_routes(client):
"""
测试状态路由。
Expand Down

0 comments on commit d3e06f4

Please sign in to comment.