"""Render-smoke, XSS-probe, byte-identity, and autoescape tests for the Host Agent console Jinja2 templates (Tasks 6.3-6.7).""" from __future__ import annotations from pathlib import Path from typing import Any import pytest from host_agent.config import HostAgentConfig from host_agent.web.auth import SessionState from .conftest import ( XSS_PROBE, _ESCAPED_PROBE, make_account_context, make_dashboard_context, make_devices_context, make_history_context, make_login_context, make_task_detail_context, make_tasks_list_context, ) # --------------------------------------------------------------------------- # 6.3 Render-smoke tests (one per template) # --------------------------------------------------------------------------- def test_login_renders(env) -> None: html = env.get_template("login.html").render( **make_login_context(account={"username": "operator"}) ) assert '