Skip to content

Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)

Python
545 B
Raw Blame
"""Explicit web-client double for tests that do not perform outbound requests."""

import pytest

from free_claude_code.application.web_tools.ports import WebFetchEgressPolicy
from free_claude_code.core.web_tools import WebFetchResult, WebSearchResult


class StubWebToolsClient:
    async def search(self, query: str) -> list[WebSearchResult]:
        pytest.fail(f"Unexpected web search: {query!r}")

    async def fetch(self, url: str, *, egress: WebFetchEgressPolicy) -> WebFetchResult:
        pytest.fail(f"Unexpected web fetch: {url!r}")