Import project files

This commit is contained in:
2026-01-07 17:18:26 +08:00
parent 7d9fff2c34
commit 0b07e63b76
66 changed files with 11497 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import sys
from pathlib import Path
from fastapi.testclient import TestClient
root = Path(__file__).resolve().parents[2] / "docling"
sys.path.insert(0, str(root))
import app.server as server
from docling.tests.test_api_prd import setup_module, PNG
setup_module()
app = server.app
c = TestClient(app)
files = {"file": ("管理端使用说明 (1).pdf", b"%PDF-1.4\n")}
data = {"export": "markdown", "save": "true", "filename": "管理端使用说明 (1)"}
r = c.post("/api/convert", files=files, data=data)
print(r.json())