Files
streamrip-ui/backend/tests/test_health.py
T

27 lines
655 B
Python

from fastapi.testclient import TestClient
from app.main import app
def test_health():
c = TestClient(app)
r = c.get("/api/health")
assert r.status_code == 200
assert r.json()["status"] == "ok"
def test_sources_deezer_only():
c = TestClient(app)
r = c.get("/api/sources")
assert r.status_code == 200
assert r.json()["sources"] == ["deezer"]
def test_version_endpoint(monkeypatch):
from app.core import settings
monkeypatch.setattr(settings, "APP_VERSION", "2026.10.04.7")
c = TestClient(app)
r = c.get("/api/version")
assert r.status_code == 200
assert r.json() == {"version": "2026.10.04.7"}