@@ -398,8 +398,31 @@ async def test_client_get_public_url(
398398 assert response .content == file .file_content
399399
400400
401+ async def test_client_upload_with_custom_metadata (
402+ storage_file_client_public : AsyncBucketProxy , file : FileForTesting
403+ ) -> None :
404+ """Ensure we can get the public url of a file in a bucket"""
405+ await storage_file_client_public .upload (
406+ file .bucket_path ,
407+ file .local_path ,
408+ {
409+ "content-type" : file .mime_type ,
410+ "metadata" : {"custom" : "metadata" , "second" : "second" , "third" : "third" },
411+ },
412+ )
413+
414+ info = await storage_file_client_public .info (file .bucket_path )
415+ assert "metadata" in info .keys ()
416+ assert info ["name" ] == file .bucket_path
417+ assert info ["metadata" ] == {
418+ "custom" : "metadata" ,
419+ "second" : "second" ,
420+ "third" : "third" ,
421+ }
422+
423+
401424async def test_client_info (
402- storage_file_client_public : SyncBucketProxy , file : FileForTesting
425+ storage_file_client_public : AsyncBucketProxy , file : FileForTesting
403426) -> None :
404427 """Ensure we can get the public url of a file in a bucket"""
405428 await storage_file_client_public .upload (
@@ -413,7 +436,7 @@ async def test_client_info(
413436
414437
415438async def test_client_exists (
416- storage_file_client_public : SyncBucketProxy , file : FileForTesting
439+ storage_file_client_public : AsyncBucketProxy , file : FileForTesting
417440) -> None :
418441 """Ensure we can get the public url of a file in a bucket"""
419442 await storage_file_client_public .upload (
0 commit comments