|
21 | 21 | from pytfe.errors import InvalidQueryRunIDError, InvalidWorkspaceIDError |
22 | 22 | from pytfe.models import ( |
23 | 23 | QueryRun, |
24 | | - QueryRunCancelOptions, |
25 | 24 | QueryRunCreateOptions, |
26 | | - QueryRunForceCancelOptions, |
27 | 25 | QueryRunIncludeOpt, |
28 | 26 | QueryRunListOptions, |
29 | 27 | QueryRunReadOptions, |
@@ -431,26 +429,6 @@ def test_cancel_success(self, query_runs_service, mock_transport): |
431 | 429 | mock_transport.request.assert_called_once_with( |
432 | 430 | "POST", |
433 | 431 | "/api/v2/queries/qr-123abc456def/actions/cancel", |
434 | | - json_body=None, |
435 | | - ) |
436 | | - |
437 | | - def test_cancel_with_comment(self, query_runs_service, mock_transport): |
438 | | - """Test cancellation with comment.""" |
439 | | - mock_response = Mock() |
440 | | - mock_transport.request.return_value = mock_response |
441 | | - |
442 | | - options = QueryRunCancelOptions(comment="Canceling due to configuration error") |
443 | | - |
444 | | - query_runs_service.cancel("qr-123abc456def", options) |
445 | | - |
446 | | - # Verify the request includes comment |
447 | | - call_args = mock_transport.request.call_args |
448 | | - assert call_args[0][0] == "POST" |
449 | | - assert call_args[0][1] == "/api/v2/queries/qr-123abc456def/actions/cancel" |
450 | | - json_body = call_args[1]["json_body"] |
451 | | - assert ( |
452 | | - json_body["data"]["attributes"]["comment"] |
453 | | - == "Canceling due to configuration error" |
454 | 432 | ) |
455 | 433 |
|
456 | 434 | def test_cancel_invalid_id(self, query_runs_service): |
@@ -478,26 +456,6 @@ def test_force_cancel_success(self, query_runs_service, mock_transport): |
478 | 456 | mock_transport.request.assert_called_once_with( |
479 | 457 | "POST", |
480 | 458 | "/api/v2/queries/qr-123abc456def/actions/force-cancel", |
481 | | - json_body=None, |
482 | | - ) |
483 | | - |
484 | | - def test_force_cancel_with_comment(self, query_runs_service, mock_transport): |
485 | | - """Test force cancellation with comment.""" |
486 | | - mock_response = Mock() |
487 | | - mock_transport.request.return_value = mock_response |
488 | | - |
489 | | - options = QueryRunForceCancelOptions(comment="Force canceling stuck query run") |
490 | | - |
491 | | - query_runs_service.force_cancel("qr-123abc456def", options) |
492 | | - |
493 | | - # Verify the request includes comment |
494 | | - call_args = mock_transport.request.call_args |
495 | | - assert call_args[0][0] == "POST" |
496 | | - assert call_args[0][1] == "/api/v2/queries/qr-123abc456def/actions/force-cancel" |
497 | | - json_body = call_args[1]["json_body"] |
498 | | - assert ( |
499 | | - json_body["data"]["attributes"]["comment"] |
500 | | - == "Force canceling stuck query run" |
501 | 459 | ) |
502 | 460 |
|
503 | 461 | def test_force_cancel_invalid_id(self, query_runs_service): |
|
0 commit comments