refactor(backend): 重构后端admin和schedule部分

This commit is contained in:
sophie committed 2026-07-01 13:34:29 +08:00
1 parent 9f5493185d
commit 4a14960e01
74 files changed
+5937 -3644

No files matched your search

@@ -0,0 +1,15 @@
"""
tests/services/schedule/test_import_service.py
用途:import_service 批量导入参数校验单元测试。
"""
import pytest
from app.core.errors import ValidationError
from app.services.schedule.import_service import import_schedules_from_payload
def test_import_schedules_rejects_non_list(app):
with app.app_context():
with pytest.raises(ValidationError, match='schedules missing'):
import_schedules_from_payload({'bad': True}, actor_id=1)