"""Router tests - Health, CORS, Middleware.""" class TestHealth: def test_health(self, client): r = client.get("/health") assert r.status_code == 200 assert r.json()["status"] == "ok" class TestNotFound: def test_unknown_route(self, client): r = client.get("/api/nonexistent") assert r.status_code == 404 class TestCORS: def test_cors_headers(self, client): r = client.get("/api/songs", headers={"Origin": "http://localhost:5173"}) assert r.status_code == 200 assert "access-control-allow-origin" in r.headers