feat: 清理示例数据并统一空态体验

This commit is contained in:
Cheng Zhou
2026-03-31 11:20:57 +08:00
parent fc74d1e9a9
commit 4bebc64662
38 changed files with 786 additions and 729 deletions
+1 -4
View File
@@ -43,9 +43,8 @@ class _DummyEngine:
@pytest.mark.asyncio
async def test_development_startup_does_not_seed_demo_fees(monkeypatch):
async def test_development_startup_does_not_seed_business_data(monkeypatch):
ensure_admin_exists = AsyncMock()
seed_demo_fees = AsyncMock()
create_all = AsyncMock()
legacy_pk = AsyncMock()
scheduler_task = _DummyTask()
@@ -63,7 +62,6 @@ async def test_development_startup_does_not_seed_demo_fees(monkeypatch):
monkeypatch.setattr(main.settings, "ENV", "development")
monkeypatch.setattr(main, "ensure_admin_exists", ensure_admin_exists)
monkeypatch.setattr(main, "seed_demo_fees", seed_demo_fees, raising=False)
monkeypatch.setattr(main, "run_daily_lost_visit_job", fake_scheduler)
monkeypatch.setattr(main.asyncio, "create_task", fake_create_task)
monkeypatch.setattr(main, "engine", _DummyEngine())
@@ -75,4 +73,3 @@ async def test_development_startup_does_not_seed_demo_fees(monkeypatch):
pass
ensure_admin_exists.assert_awaited_once()
seed_demo_fees.assert_not_awaited()