Files
romm/backend/tests/endpoints/test_platform.py
T
Georges-Antoine Assi ed6f9f5907 cleanup endpoint tests
2026-03-14 23:56:46 -04:00

15 lines
420 B
Python

from fastapi import status
def test_get_platforms(client, access_token, platform):
response = client.get("/api/platforms")
assert response.status_code == status.HTTP_403_FORBIDDEN
response = client.get(
"/api/platforms", headers={"Authorization": f"Bearer {access_token}"}
)
assert response.status_code == status.HTTP_200_OK
platforms = response.json()
assert len(platforms) == 1