| 123456789 |
- import pytest
- from fastapi.testclient import TestClient
- from backend.api.ai_swap_api import app
- client = TestClient(app)
- def test_swap_api_smoke():
- response = client.post("/swap", json={"param": "value"})
- assert response.status_code in (200, 422, 400) # 允许参数校验失败
|