mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-22 21:06:32 +00:00
refactor: 重构前端组件和样式,添加AI助手功能 docs: 更新README文档,添加ruff代码检查说明 feat: 新增AI助手相关API和前端组件 chore: 更新.gitignore文件,添加ruff缓存配置 fix: 修复前端布局和设置相关的问题 perf: 优化代码结构和性能,移除冗余代码 test: 更新测试文件,移除编码声明 build: 更新依赖版本,调整requirements.txt
22 lines
389 B
Python
22 lines
389 B
Python
|
|
import os
|
|
import sys
|
|
|
|
import pytest
|
|
|
|
from fastapi.testclient import TestClient
|
|
|
|
# 导入 main 模块,确保路径正确
|
|
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
|
|
|
from main import create_app
|
|
|
|
# 创建测试客户端
|
|
app = create_app()
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def test_client():
|
|
with TestClient(app) as client:
|
|
yield client
|