MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / tool_command

Function tool_command

lib/cli/tests/tools/test_main.py:32–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30
31@pytest.fixture
32def tool_command():
33 with tempfile.TemporaryDirectory() as temp_dir:
34 with patch.object(
35 TokenManager, "_get_secure_storage_path", return_value=Path(temp_dir)
36 ):
37 TokenManager().save_tokens(
38 "test-token", (datetime.now() + timedelta(seconds=36000)).timestamp()
39 )
40 tool_command = ToolCommand()
41 with patch.object(tool_command, "login"):
42 yield tool_command
43
44
45@patch("crewai_cli.tools.main.subprocess.run")

Callers

nothing calls this directly

Calls 3

TokenManagerClass · 0.90
ToolCommandClass · 0.90
save_tokensMethod · 0.80

Tested by

no test coverage detected