diff --git a/tests/test_disabled_tools_policy.py b/tests/test_disabled_tools_policy.py index c575f7f95..5e6dced80 100644 --- a/tests/test_disabled_tools_policy.py +++ b/tests/test_disabled_tools_policy.py @@ -136,6 +136,7 @@ def test_registry_hides_and_blocks_disabled_tools(tmp_path, monkeypatch): def test_registry_hides_missing_credential_tools(tmp_path, monkeypatch): + monkeypatch.setattr("ouroboros.tools.github.github_cli_configured", lambda: False) monkeypatch.delenv("ANTHROPIC_API_KEY", raising=False) monkeypatch.delenv("GITHUB_TOKEN", raising=False) monkeypatch.delenv("OPENROUTER_API_KEY", raising=False) diff --git a/tests/test_promoted_task_toolset.py b/tests/test_promoted_task_toolset.py index a0f683c6a..b6edfcf1b 100644 --- a/tests/test_promoted_task_toolset.py +++ b/tests/test_promoted_task_toolset.py @@ -40,10 +40,11 @@ def test_credential_gated_tool_is_not_advertised_when_unavailable(tmp_path, monk monkeypatch.setattr(search, "_available_web_search_backends", lambda: []) monkeypatch.delenv("GITHUB_TOKEN", raising=False) + monkeypatch.setattr("ouroboros.tools.github.github_cli_configured", lambda: False) toolset = _toolset(tmp_path) assert "web_search" not in toolset["top_level_tools"] assert "missing_credential" in toolset["unavailable_builtin_tools"]["web_search"] - # GitHub built-ins without a token: same typed omission, not "does not exist". + # No GitHub credentials from env, settings or CLI: the same typed omission. assert "get_github_issue" not in toolset["top_level_tools"] assert "missing_credential" in toolset["unavailable_builtin_tools"]["get_github_issue"]