mirror of
https://github.com/rommapp/romm.git
synced 2026-02-19 07:50:57 +01:00
Create separate `tests/` folder for all tests. This will also simplify not copying tests code into the Docker image.
25 lines
714 B
Python
25 lines
714 B
Python
import pytest
|
|
from fastapi import status
|
|
from fastapi.testclient import TestClient
|
|
from main import app
|
|
|
|
|
|
@pytest.fixture
|
|
def client():
|
|
with TestClient(app) as client:
|
|
yield client
|
|
|
|
|
|
def test_config(client):
|
|
response = client.get("/api/config")
|
|
assert response.status_code == status.HTTP_200_OK
|
|
|
|
config = response.json()
|
|
assert config.get("EXCLUDED_PLATFORMS") == []
|
|
assert config.get("EXCLUDED_SINGLE_EXT") == []
|
|
assert config.get("EXCLUDED_SINGLE_FILES") == []
|
|
assert config.get("EXCLUDED_MULTI_FILES") == []
|
|
assert config.get("EXCLUDED_MULTI_PARTS_EXT") == []
|
|
assert config.get("EXCLUDED_MULTI_PARTS_FILES") == []
|
|
assert config.get("PLATFORMS_BINDING") == {}
|