feat: add system quality improvement plan and implementation

This commit is contained in:
张翔
2026-03-12 18:20:50 +08:00
parent c8646974d8
commit fe2e4110dd
238 changed files with 21864 additions and 2026 deletions
+61 -4
View File
@@ -70,7 +70,7 @@ async def auth_token(http_client: AsyncClient) -> str:
)
assert response.status_code == 200
data = response.json()
return data.get("accessToken")
return data.get("token")
@pytest.fixture
@@ -100,9 +100,10 @@ def test_role_data():
import time
timestamp = int(time.time() * 1000)
return {
"name": f"TEST_ROLE_{timestamp}",
"description": "测试角色",
"permissions": "READ,WRITE"
"roleName": f"TEST_ROLE_{timestamp}",
"roleKey": f"test_role_{timestamp}",
"roleSort": 1,
"status": 1
}
@@ -159,3 +160,59 @@ async def cleanup_dictionary(authenticated_client: AsyncClient):
await authenticated_client.delete(f"/api/dictionaries/{dict_id}")
except Exception:
pass
@pytest.fixture
async def cleanup_dict_type(authenticated_client: AsyncClient):
"""清理字典类型"""
dict_ids = []
yield dict_ids
for dict_id in dict_ids:
try:
await authenticated_client.delete(f"/api/dict/types/{dict_id}")
except Exception:
pass
@pytest.fixture
async def cleanup_config(authenticated_client: AsyncClient):
"""清理系统配置"""
config_ids = []
yield config_ids
for config_id in config_ids:
try:
await authenticated_client.delete(f"/api/config/{config_id}")
except Exception:
pass
@pytest.fixture
async def cleanup_notice(authenticated_client: AsyncClient):
"""清理系统公告"""
notice_ids = []
yield notice_ids
for notice_id in notice_ids:
try:
await authenticated_client.delete(f"/api/notices/{notice_id}")
except Exception:
pass
@pytest.fixture
async def cleanup_file(authenticated_client: AsyncClient):
"""清理文件"""
file_ids = []
yield file_ids
for file_id in file_ids:
try:
await authenticated_client.delete(f"/api/files/{file_id}")
except Exception:
pass