def METHOD_NAME(
    rule_runner: RuleRunner,
    monkeypatch_botocore,
    request_url: str,
    expected_auth_url: str,
    expected_native_url: str,
    req_type: type,
    replace_url,
) -> None:
    class S3HTTPHandler(BaseHTTPRequestHandler):
        response_text = b"Hello, client!"
        def do_HEAD(self):
            self.send_headers()
        def do_GET(self):
            self.send_headers()
            self.wfile.write(self.response_text)
        def send_headers(self):
            assert self.headers["AUTH"] == "TOKEN"
            self.send_response(200)
            self.send_header("Content-Type", "binary/octet-stream")
            self.send_header("Content-Length", f"{len(self.response_text)}")
            self.end_headers()
    monkeypatch_botocore(expected_auth_url)
    with http_server(S3HTTPHandler) as port:
        replace_url(expected_native_url, port)
        snapshot = rule_runner.request(
            Snapshot,
            [req_type(request_url, DOWNLOADS_FILE_DIGEST)],
        )
    assert snapshot.files == ("file.txt",)
    assert snapshot.digest == DOWNLOADS_EXPECTED_DIRECTORY_DIGEST