MCPcopy Index your code
hub / github.com/simstudioai/sim / test_context_manager

Function test_context_manager

packages/python-sdk/tests/test_client.py:90–94  ·  view source on GitHub ↗

Test SimStudioClient as context manager.

(mock_close)

Source from the content-addressed store, hash-verified

88
89@patch('simstudio.requests.Session.close')
90def test_context_manager(mock_close):
91 """Test SimStudioClient as context manager."""
92 with SimStudioClient(api_key="test-api-key") as client:
93 assert client.api_key == "test-api-key"
94 mock_close.assert_called_once()
95
96
97@patch('simstudio.requests.Session.post')

Callers

nothing calls this directly

Calls 1

SimStudioClientClass · 0.90

Tested by

no test coverage detected