File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
services/storage/tests/unit Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 2020 JobError ,
2121)
2222from models_library .api_schemas_storage import STORAGE_RPC_NAMESPACE
23+ from models_library .api_schemas_storage .export_data_async_jobs import AccessRightError
2324from models_library .products import ProductName
2425from models_library .rabbitmq_basic_types import RPCMethodName
2526from models_library .users import UserID
@@ -84,7 +85,7 @@ async def _process_action(action: str, payload: Any) -> Any:
8485 case Action .ECHO :
8586 return payload
8687 case Action .RAISE :
87- raise pickle .loads (payload )
88+ raise pickle .loads (payload ) # noqa: S301
8889 case Action .SLEEP :
8990 await asyncio .sleep (payload )
9091 return None
@@ -294,8 +295,11 @@ async def test_async_jobs_cancel_(
294295@pytest .mark .parametrize (
295296 "error" ,
296297 [
297- Exception ("some generic exception" ),
298- # TODO: figure out if osparc errors are formatted as expected
298+ pytest .param (Exception ("generic error" ), id = "generic-error" ),
299+ pytest .param (
300+ AccessRightError (user_id = 1 , file_id = "fake_key" , location_id = 0 ),
301+ id = "custom-osparc-error" ,
302+ ),
299303 ],
300304)
301305async def test_async_jobs_raises (
You can’t perform that action at this time.
0 commit comments