sciagent code + Gitea Actions CI/CD
CI/CD / backend (push) Failing after 2m8s
CI/CD / frontend (push) Failing after 1m40s
CI/CD / deploy (push) Has been skipped

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Thinh Lam
2026-06-30 09:38:30 +07:00
commit 688fac73e9
1167 changed files with 158244 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
"""
GET /api/conferences and /api/supervisors — dashboard filter lookups.
Run: cd be0 && python -m unittest tests.test_dashboard_lookup_routes -v
"""
from __future__ import annotations
import unittest
from unittest.mock import patch
class DashboardLookupRoutesTests(unittest.TestCase):
def test_no_db_returns_empty_lists(self) -> None:
from fastapi.testclient import TestClient
from main import app
from src.initiative_db import engine as eng
with patch.object(eng, "is_postgres_enabled", return_value=False):
client = TestClient(app)
r1 = client.get("/api/conferences")
r2 = client.get("/api/supervisors")
self.assertEqual(r1.status_code, 200, r1.text)
self.assertEqual(r2.status_code, 200, r2.text)
self.assertEqual(r1.json(), [])
self.assertEqual(r2.json(), [])
if __name__ == "__main__":
unittest.main()