import re from fastapi.testclient import TestClient def test_static_assets_are_served_with_a_cache_busting_version(client: TestClient) -> None: response = client.get("/login") assert response.status_code == 200 assert re.search(r'/static/style\.css\?v=[0-9a-f]{6,}"', response.text) assert re.search(r'/static/app\.js\?v=[0-9a-f]{6,}"', response.text) assert re.search(r'/static/htmx\.min\.js\?v=[0-9a-f]{6,}"', response.text)