import pytest from httpx import AsyncClient @pytest.mark.asyncio async def test_get_acquisition_costs(client: AsyncClient): response = await client.get("/acquisition-data") assert response.status_code == 200 assert response.json()["message"] == "Data retrieved successfully" @pytest.mark.asyncio async def test_create_acquisition_cost(client: AsyncClient): payload = { "assetnum": "TEST-ASSET", "acquisition_cost": 1000.0, "acquisition_year": 2024, "residual_value": 100.0, "useful_life": 10 } response = await client.post("/acquisition-data", json=payload) # Note: This might fail if the schema requires more fields OR if those are valid but I'm missing some required ones. # I'll check the schema if it fails, but for now I'll assume standard POST behavior. assert response.status_code == 200 assert response.json()["message"] == "Data created successfully"