Compare commits

..

No commits in common. "e837934bec0b9b969138c41b98246e0fb244326a" and "94cdd0f4079b33214923c0e245064006933f5beb" have entirely different histories.

2 changed files with 1 additions and 16 deletions

View File

@ -1,12 +1,9 @@
from pathlib import Path
from fastapi import APIRouter
from fastapi.responses import HTMLResponse
router = APIRouter()
DASHBOARD_FILE = Path(__file__).resolve().parent.parent / "frontend" / "index.html"
@router.get("/", response_class=HTMLResponse)
async def dashboard() -> str:
return DASHBOARD_FILE.read_text()
return open("frontend/index.html").read()

View File

@ -1,12 +0,0 @@
import pytest
from src.views import dashboard
@pytest.mark.anyio
async def test_dashboard_renders_outside_repository_working_directory(monkeypatch, tmp_path):
monkeypatch.chdir(tmp_path)
html = await dashboard()
assert "Stackchain Dashboard" in html