Modernize provider support
This commit is contained in:
@@ -269,6 +269,25 @@ class TestResolveToolReferences:
|
||||
|
||||
assert ("official/unapproved", "no approved public version") in result.registry_tool_issues
|
||||
|
||||
def test_get_visibility_uses_owner_path(self, tmp_path):
|
||||
from cmdforge.collection import _get_tool_visibility_from_yaml
|
||||
from cmdforge.tool import get_tools_dir
|
||||
|
||||
with patch('cmdforge.tool.TOOLS_DIR', tmp_path / ".cmdforge"):
|
||||
tools_dir = get_tools_dir()
|
||||
owned = tools_dir / "myuser" / "private-tool"
|
||||
owned.mkdir(parents=True)
|
||||
(owned / "config.yaml").write_text(
|
||||
yaml.safe_dump({
|
||||
"name": "private-tool",
|
||||
"visibility": "private",
|
||||
})
|
||||
)
|
||||
|
||||
result = _get_tool_visibility_from_yaml("private-tool", my_owner="myuser")
|
||||
|
||||
assert result == "private"
|
||||
|
||||
|
||||
class TestToolResolutionResult:
|
||||
"""Tests for ToolResolutionResult dataclass."""
|
||||
|
||||
Reference in New Issue
Block a user