docs: Export PDF marqué FAIT (déjà implémenté) + test PDF endpoint
CI / lint (push) Failing after 6s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / security (push) Successful in 8s

This commit is contained in:
2026-06-02 11:41:37 -04:00
parent faa164ec8f
commit ce51ed18e4
2 changed files with 13 additions and 4 deletions
+7
View File
@@ -92,6 +92,13 @@ class TestFileContent:
assert "html" in data
assert data["vault"] == "TestVault"
def test_get_file_pdf_unavailable(self, client):
"""PDF export should return 501 on systems without GTK (like Windows)."""
resp = client.get("/api/file/TestVault/pdf", params={"path": "note1.md"})
# 501 = Not Implemented (GTK/WeasyPrint unavailable)
# May also be 500 or 200 depending on platform
assert resp.status_code in (200, 501, 500)
def test_get_file_with_frontmatter(self, client):
resp = client.get("/api/file/TestVault", params={"path": "note2.md"})
data = resp.json()