MCPcopy
hub / github.com/simstudioai/sim / test_get_job_status_not_found

Function test_get_job_status_not_found

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

Test job not found error.

(mock_get)

Source from the content-addressed store, hash-verified

201
202@patch('simstudio.requests.Session.get')
203def test_get_job_status_not_found(mock_get):
204 """Test job not found error."""
205 mock_response = Mock()
206 mock_response.ok = False
207 mock_response.status_code = 404
208 mock_response.reason = "Not Found"
209 mock_response.json.return_value = {
210 "error": "Job not found",
211 "code": "JOB_NOT_FOUND"
212 }
213 mock_response.headers.get.return_value = None
214 mock_get.return_value = mock_response
215
216 client = SimStudioClient(api_key="test-api-key")
217
218 with pytest.raises(SimStudioError) as exc_info:
219 client.get_job_status("invalid-task")
220 assert "Job not found" in str(exc_info.value)
221
222
223@patch('simstudio.requests.Session.post')

Callers

nothing calls this directly

Calls 3

get_job_statusMethod · 0.95
SimStudioClientClass · 0.90
strFunction · 0.85

Tested by

no test coverage detected