File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
services/web/server/tests/unit/with_dbs/04/functions_rpc Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -605,6 +605,7 @@ async def test_register_get_delete_function_job(
605605 assert retrieved_job .inputs == registered_job .inputs
606606 assert retrieved_job .outputs == registered_job .outputs
607607
608+ # Test denied access for another user
608609 with pytest .raises (FunctionJobReadAccessDeniedError ):
609610 await functions_rpc .get_function_job (
610611 rabbitmq_rpc_client = rpc_client ,
@@ -613,6 +614,15 @@ async def test_register_get_delete_function_job(
613614 product_name = osparc_product_name ,
614615 )
615616
617+ # Test denied access for anothe product
618+ with pytest .raises (FunctionJobReadAccessDeniedError ):
619+ await functions_rpc .get_function_job (
620+ rabbitmq_rpc_client = rpc_client ,
621+ function_job_id = registered_job .uid ,
622+ user_id = other_logged_user ["id" ],
623+ product_name = "this_is_not_osparc" ,
624+ )
625+
616626 with pytest .raises (FunctionJobReadAccessDeniedError ):
617627 # Attempt to delete the function job by another user
618628 await functions_rpc .delete_function_job (
You can’t perform that action at this time.
0 commit comments