test_crypto_client.py 391 B

1234567891011
  1. from __future__ import annotations
  2. def test_crypto_get_price_shape():
  3. from src.trader_mcp.crypto_client import call_crypto_tool
  4. resp = call_crypto_tool("get_price", {"symbol": "xrp"})
  5. assert isinstance(resp, dict)
  6. assert resp.get("symbol") in {"xrp", "XRP"}
  7. assert isinstance(resp.get("price"), (int, float))
  8. assert isinstance(resp.get("timestamp"), (int, float))