mirror of
https://github.com/rommapp/romm.git
synced 2026-04-23 06:54:40 +00:00
15 lines
420 B
Python
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
|