import pytest from fastapi.testclient import TestClient def test_health_check(client: TestClient): response = client.get("/health") assert response.status_code == 200 assert response.json()["status"] == "healthy" def test_dashboard_summary(client: TestClient): response = client.get("/api/v1/dashboard/summary") assert response.status_code == 200 def test_latest_prices(client: TestClient): response = client.get("/api/v1/dashboard/prices") assert response.status_code == 200 assert "regions" in response.json() def test_battery_states(client: TestClient): response = client.get("/api/v1/dashboard/battery") assert response.status_code == 200 assert "batteries" in response.json() def test_arbitrage_opportunities(client: TestClient): response = client.get("/api/v1/dashboard/arbitrage") assert response.status_code == 200 assert "opportunities" in response.json() def test_get_settings(client: TestClient): response = client.get("/api/v1/settings") assert response.status_code == 200 def test_list_models(client: TestClient): response = client.get("/api/v1/models") assert response.status_code == 200 def test_get_strategies(client: TestClient): response = client.get("/api/v1/trading/strategies") assert response.status_code == 200