@@ -536,9 +536,8 @@ async def test_get_async_jobs_status(
536536 (JobSchedulerError (exc = _faker .text ()), status .HTTP_500_INTERNAL_SERVER_ERROR ),
537537 (JobMissingError (job_id = _faker .uuid4 ()), status .HTTP_404_NOT_FOUND ),
538538 ],
539- ids = lambda x : type (x ).__name__ ,
540539)
541- async def test_cancel_async_jobs (
540+ async def test_cancel_and_delete_async_jobs (
542541 user_role : UserRole ,
543542 logged_user : UserInfoDict ,
544543 client : TestClient ,
@@ -554,33 +553,6 @@ async def test_cancel_async_jobs(
554553 backend_result_or_exception ,
555554 )
556555
557- response = await client .post (f"/{ API_VERSION } /tasks/{ _job_id } :cancel" )
558- assert response .status == expected_status
559-
560-
561- @pytest .mark .parametrize ("user_role" , _user_roles )
562- @pytest .mark .parametrize (
563- "backend_result_or_exception, expected_status" ,
564- [
565- (
566- AsyncJobAbort (result = True , job_id = AsyncJobId (_faker .uuid4 ())),
567- status .HTTP_204_NO_CONTENT ,
568- ),
569- (JobSchedulerError (exc = _faker .text ()), status .HTTP_500_INTERNAL_SERVER_ERROR ),
570- (JobMissingError (job_id = _faker .uuid4 ()), status .HTTP_404_NOT_FOUND ),
571- ],
572- ids = lambda x : type (x ).__name__ ,
573- )
574- async def test_delete_async_jobs (
575- user_role : UserRole ,
576- logged_user : UserInfoDict ,
577- client : TestClient ,
578- create_storage_rpc_client_mock : Callable [[str , str , Any ], None ],
579- faker : Faker ,
580- backend_result_or_exception : Any ,
581- expected_status : int ,
582- ):
583- _job_id = AsyncJobId (faker .uuid4 ())
584556 create_storage_rpc_client_mock (
585557 "simcore_service_webserver.tasks._rest" ,
586558 f"async_jobs.{ async_jobs .delete .__name__ } " ,
0 commit comments