Test job not found error.
(mock_get)
| 201 | |
| 202 | @patch('simstudio.requests.Session.get') |
| 203 | def 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') |
nothing calls this directly
no test coverage detected