feat: add base template with Pico CSS dark theme and home page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
22
tests/test_pages.py
Normal file
22
tests/test_pages.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""Tests for HTML page routes."""
|
||||
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
|
||||
class TestHomePage:
|
||||
"""Tests for GET /."""
|
||||
|
||||
def test_home_returns_200(self, client: TestClient) -> None:
|
||||
"""GET / should return HTTP 200."""
|
||||
response = client.get("/")
|
||||
assert response.status_code == 200
|
||||
|
||||
def test_home_contains_app_name(self, client: TestClient) -> None:
|
||||
"""GET / should render HTML containing the app name."""
|
||||
response = client.get("/")
|
||||
assert "SneakySwole" in response.text
|
||||
|
||||
def test_home_has_dark_theme(self, client: TestClient) -> None:
|
||||
"""GET / should use the dark theme."""
|
||||
response = client.get("/")
|
||||
assert 'data-theme="dark"' in response.text
|
||||
Reference in New Issue
Block a user