@@ -990,10 +990,8 @@ async def test_download_file_1_to_1_with_file_meta_data(
990990 data , error = assert_status (response , status .HTTP_200_OK , FileDownloadResponse )
991991 assert not error
992992 assert data
993- assert "link" in data
994- assert TypeAdapter (AnyHttpUrl ).validate_python (data ["link" ])
995993 await _assert_file_downloaded (
996- faker , tmp_path , link = data [ " link" ] , uploaded_file = uploaded_file
994+ faker , tmp_path , link = data . link , uploaded_file = uploaded_file
997995 )
998996
999997
@@ -1039,14 +1037,13 @@ async def test_download_file_from_inside_a_directory(
10391037 )
10401038
10411039 # finally check the download link
1042- download_url = (
1043- client .app .router ["download_file" ]
1044- .url_for (
1045- location_id = f"{ location_id } " ,
1046- file_id = urllib .parse .quote (s3_file_id , safe = "" ),
1047- )
1048- .with_query (user_id = user_id )
1049- )
1040+ download_url = url_from_operation_id (
1041+ client ,
1042+ initialized_app ,
1043+ "download_file" ,
1044+ location_id = f"{ location_id } " ,
1045+ file_id = urllib .parse .quote (s3_file_id , safe = "" ),
1046+ ).with_query (user_id = user_id )
10501047 response = await client .get (f"{ download_url } " )
10511048 data , error = await assert_status (response , status .HTTP_200_OK )
10521049 assert not error
0 commit comments