← Files Dispensa: lista de comprasARCHIVED FILE

tests/test_plugin.py

859 Bytes · Nov 3, 2026 · 18:40 UTC

↓ Download file

See the change to this file →

import json
from pathlib import Path

ROOT = Path(__file__).resolve().parents[1]


def test_autor_no_manifesto_portatil():
    plugin = json.loads((ROOT / "plugin.json").read_text(encoding="utf-8"))
    claude = json.loads((ROOT / ".claude-plugin" / "plugin.json").read_text(encoding="utf-8"))

    assert plugin["$schema"].endswith("plugin.schema.json")
    assert plugin["author"]["name"] == "Cristiano Santana"
    assert claude["author"]["name"] == plugin["author"]["name"]


def test_mcp_json_e_mcp_ponto_json_sao_iguais():
    """Cursor pode ler .mcp.json; payloads diferentes viram o servidor errado."""
    mcp = (ROOT / "mcp.json").read_text(encoding="utf-8")
    claude = (ROOT / ".mcp.json").read_text(encoding="utf-8")
    assert mcp == claude
    corpo = json.loads(mcp)
    assert corpo["mcpServers"]["mcp-despensa-hub"]["url"].endswith("/mcp")

SHA-256: 4fe0b0bcfd1e519b707f361c9d6a0e3557f11f9a30bed52a41b9bdea35ecbbce