test_crypto_client.py 648 B

12345678910111213141516171819202122
  1. from __future__ import annotations
  2. import pytest
  3. def test_exec_list_accounts_returns_non_empty_json():
  4. # already covered in test_smoke
  5. from src.trader_mcp.exec_client import list_accounts
  6. accounts = list_accounts()
  7. assert isinstance(accounts, list)
  8. assert len(accounts) > 0
  9. def test_crypto_get_latest_xrp_price_shape():
  10. from src.trader_mcp.crypto_client import get_latest_xrp_price
  11. resp = get_latest_xrp_price("xrp")
  12. assert isinstance(resp, dict)
  13. assert resp.get("symbol") in {"xrp", "XRP"}
  14. assert isinstance(resp.get("price"), (int, float))
  15. assert isinstance(resp.get("timestamp"), (int, float))