Skip to main content
Glama
test_pdf_service.py640 B
from pathlib import Path import pytest from src.tools.pdf_tool import PDFService, WEASYPRINT_IMPORT_ERROR @pytest.mark.skipif(WEASYPRINT_IMPORT_ERROR is not None, reason="WeasyPrint dependencies missing") @pytest.mark.asyncio async def test_pdf_service_generates_pdf(tmp_path): markdown_path = tmp_path / "notes.md" markdown_path.write_text("# Title\nThis is a sample.", encoding="utf-8") service = PDFService() result = await service.convert(str(markdown_path)) assert result["success"] is True output_path = Path(result["output_path"]) assert output_path.exists() assert output_path.suffix == ".pdf"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/garyjeong/gary-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server