@@ -607,19 +607,12 @@ def test_upload_download_with_s3_default(self, client_with_s3_default: NemoClien
607607 )
608608
609609 # List files
610- files_response = client_with_s3_default .files .list (
611- fileset = fileset .name ,
612- workspace = fileset .workspace ,
613- )
610+ files_response = files .list_files (name = fileset .name , workspace = fileset .workspace ).data ().data
614611 assert len (files_response ) == 1
615612 assert files_response [0 ].path == "test.txt"
616613
617614 # Download and verify content
618- downloaded = client_with_s3_default .files .download_content (
619- remote_path = "test.txt" ,
620- fileset = fileset .name ,
621- workspace = fileset .workspace ,
622- )
615+ downloaded = files .download_file (name = fileset .name , workspace = fileset .workspace , path = "test.txt" ).read ()
623616 assert downloaded == test_content
624617 finally :
625618 files .delete_fileset (name = name , workspace = DEFAULT_WORKSPACE )
@@ -662,16 +655,12 @@ def test_multiple_filesets_isolated_with_s3_default(self, client_with_s3_default
662655 )
663656
664657 # Verify isolation
665- content1 = client_with_s3_default .files .download_content (
666- remote_path = "shared-name.txt" ,
667- fileset = fileset1 .name ,
668- workspace = fileset1 .workspace ,
669- )
670- content2 = client_with_s3_default .files .download_content (
671- remote_path = "shared-name.txt" ,
672- fileset = fileset2 .name ,
673- workspace = fileset2 .workspace ,
674- )
658+ content1 = files .download_file (
659+ name = fileset1 .name , workspace = fileset1 .workspace , path = "shared-name.txt"
660+ ).read ()
661+ content2 = files .download_file (
662+ name = fileset2 .name , workspace = fileset2 .workspace , path = "shared-name.txt"
663+ ).read ()
675664
676665 assert content1 == b"content for fileset 1"
677666 assert content2 == b"content for fileset 2"
@@ -706,10 +695,7 @@ def test_download_from_huggingface_fileset_with_s3_default(self, client_with_s3_
706695
707696 try :
708697 # List files to verify connection works
709- files = client_with_s3_default .files .list (
710- fileset = fileset .name ,
711- workspace = fileset .workspace ,
712- )
698+ files = files_client .list_files (name = fileset .name , workspace = fileset .workspace ).data ().data
713699 assert len (files ) > 0 , "Expected files in the HuggingFace repo"
714700
715701 # Find config.json (typically small and always present in model repos)
@@ -719,11 +705,9 @@ def test_download_from_huggingface_fileset_with_s3_default(self, client_with_s3_
719705 )
720706
721707 # Download the file - this exercises preflight validation
722- content = client_with_s3_default .files .download_content (
723- remote_path = config_file .path ,
724- fileset = fileset .name ,
725- workspace = fileset .workspace ,
726- )
708+ content = files_client .download_file (
709+ name = fileset .name , workspace = fileset .workspace , path = config_file .path
710+ ).read ()
727711
728712 assert len (content ) > 0 , "Downloaded content should not be empty"
729713
0 commit comments