"""同源Vue控制台交付及其公众号工作流程。""" import re from fastapi.testclient import TestClient from sync_server.app import create_app from sync_server.database import Database from sync_server.storage import DiskObjects def test_vue_console_is_hardened_and_uses_the_public_sync_api(tmp_path): database = Database("sqlite:///" + str(tmp_path / "sync.db")) app = create_app( database, DiskObjects(tmp_path / "objects"), tmp_path / "staging", ) database.add_user("demo", "controlled-demo-password") with TestClient(app) as client: root = client.get("/") console = client.get("/console/") assert root.status_code == console.status_code == 200 assert "OpenNexus Sync Console" in console.text assert "