19 lines
650 B
Python
19 lines
650 B
Python
|
|
"""Bare green-path E2E — one happy-path tool call cycle.
|
||
|
|
|
||
|
|
Exercises the terminal tool directly and verifies the response structure.
|
||
|
|
No API keys required. Runtime target: < 10 seconds.
|
||
|
|
"""
|
||
|
|
|
||
|
|
import json
|
||
|
|
|
||
|
|
from tools.terminal_tool import terminal_tool
|
||
|
|
|
||
|
|
|
||
|
|
def test_terminal_echo_green_path() -> None:
|
||
|
|
"""terminal('echo hello') -> verify response contains 'hello' and exit_code 0."""
|
||
|
|
result = terminal_tool(command="echo hello", timeout=10)
|
||
|
|
data = json.loads(result)
|
||
|
|
|
||
|
|
assert data["exit_code"] == 0, f"Expected exit_code 0, got {data['exit_code']}"
|
||
|
|
assert "hello" in data["output"], f"Expected 'hello' in output, got: {data['output']}"
|