def METHOD_NAME(tmp_path: Path) -> None:
    template_loc = tmp_path / "about.html"
    def before_request_handler(_: "Request") -> None:
        template_loc.write_text("before request")
    @get("/", before_request=before_request_handler)
    def index() -> Template:
        return Template(template_name="about.html")
    with create_test_client(
        [index], template_config=TemplateConfig(directory=tmp_path, engine=JinjaTemplateEngine)
    ) as client:
        res = client.get("/")
        assert res.status_code == 200
        assert res.headers["content-type"].startswith(MediaType.HTML.value)
        assert res.text == "before request"