def METHOD_NAME(self, app, cache_dir):
    with tmp_image((256, 256), format="jpeg") as img:
        expected_req = (
            {"path": r"/tms/1.0.0/foo/1/1/1.jpeg"},
            {"body": img.read(), "headers": {"content-type": "image/jpeg"}},
        )
        with mock_httpd(
            ("localhost", 42423), [expected_req], bbox_aware_query_comparator=True
        ):
            resp = app.get("/tms/1.0.0/tms_cache/0/1/1.jpeg")
            assert resp.content_type == "image/jpeg"
    cache_dir.join("tms_cache_EPSG900913/01/000/000/001/000/000/001.jpeg").check()