from __future__ import annotations
import pytest
from frankfurter_forex_mcp.models.schemas import BaseQuoteInput
from frankfurter_forex_mcp.tools import base_quote
class _ClientStub:
async def latest(self, base: str, targets: list[str]) -> dict:
return {"base": base, "date": "2026-02-24", "rates": {targets[0]: 5.12}}
@pytest.mark.asyncio
async def test_base_quote_maps_payload() -> None:
input_data = BaseQuoteInput(base="usd", targets=["brl"])
result = await base_quote.execute(input_data, _ClientStub())
assert result.base == "USD"
assert result.rates["BRL"] == 5.12