stream responses and all tests passing
This commit is contained in:
@@ -67,11 +67,13 @@ async def test_sandbox_run_executes_command():
|
||||
sb = PodmanSandbox()
|
||||
await sb.__aenter__()
|
||||
|
||||
result = await sb.run("echo 'hello from sandbox'")
|
||||
result = sb.run("echo 'hello from sandbox'")
|
||||
|
||||
# Verify exec_run was called with shell wrapper
|
||||
mock_container.exec_run.assert_called_once_with(
|
||||
["/bin/sh", "-c", "echo 'hello from sandbox'"], workdir="/workspace"
|
||||
["/bin/sh", "-c", "echo 'hello from sandbox'"],
|
||||
workdir="/workspace",
|
||||
demux=False,
|
||||
)
|
||||
assert result == "hello from sandbox\n"
|
||||
|
||||
@@ -83,7 +85,7 @@ async def test_tool_call_fails_if_sandbox_crashes():
|
||||
|
||||
# Simulate crashed sandbox (container is None)
|
||||
mock_sandbox = MagicMock()
|
||||
mock_sandbox.run = AsyncMock(side_effect=RuntimeError("Container crashed"))
|
||||
mock_sandbox.run = MagicMock(side_effect=RuntimeError("Container crashed"))
|
||||
|
||||
result = await bash("ls -la", mock_sandbox)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user