You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.1 KiB
Python
27 lines
1.1 KiB
Python
import pytest
|
|
from httpx import AsyncClient
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_get_equipments(client: AsyncClient):
|
|
response = await client.get("/equipment")
|
|
assert response.status_code == 200
|
|
assert response.json()["message"] == "Data retrieved successfully"
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_get_top_10_replacement_priorities(client: AsyncClient):
|
|
response = await client.get("/equipment/top-10-replacement-priorities")
|
|
assert response.status_code == 200
|
|
assert response.json()["message"] == "Top 10 Replacement Priorities Data retrieved successfully"
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_get_top_10_economic_life(client: AsyncClient):
|
|
response = await client.get("/equipment/top-10-economic-life")
|
|
assert response.status_code == 200
|
|
assert response.json()["message"] == "Top 10 Economic Life Data retrieved successfully"
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_count_remaining_life(client: AsyncClient):
|
|
response = await client.get("/equipment/count-remaining-life")
|
|
assert response.status_code == 200
|
|
assert response.json()["message"] == "Count remaining life retrieved successfully"
|