"""{{ display_name }} MCP server — generated by mcpify. Do not hand-edit."""

from __future__ import annotations

import pytest

from {{ module_name }}.auth.errors import MissingCredentialsError
from {{ module_name }}.auth.strategies.pat import PatAuthStrategy


async def test_wraps_the_token_in_a_bearer_authorization_header() -> None:
    strategy = PatAuthStrategy()
    credentials = await strategy.authenticate({"token": "abc123"})
    assert credentials["authorization_header"] == "Bearer abc123"


async def test_rejects_a_config_missing_the_token() -> None:
    strategy = PatAuthStrategy()
    with pytest.raises(MissingCredentialsError):
        await strategy.authenticate({})
