@@ -914,31 +914,49 @@ def test_deliver_progress_options(transformed_result, codegen_list, with_event_l
914
914
]
915
915
}
916
916
)
917
+
918
+ async def fake_submit (signed_urls_only , expandable_progress ):
919
+ expandable_progress .add_task ("zip" , start = False , total = None )
920
+ return transformed_result
921
+
917
922
with (
918
- patch (
919
- "servicex.dataset_group.DatasetGroup.as_files" ,
920
- return_value = [transformed_result ],
921
- ),
922
923
patch (
923
924
"servicex.servicex_client.ServiceXClient.get_code_generators" ,
924
925
return_value = codegen_list ,
925
926
),
927
+ patch (
928
+ "servicex.servicex_adapter.ServiceXAdapter._get_authorization" ,
929
+ return_value = {"Authorization" : "Bearer aaa" },
930
+ ),
931
+ patch (
932
+ "servicex.query_core.Query.submit_and_download" ,
933
+ side_effect = fake_submit ,
934
+ ),
926
935
):
927
- deliver (
936
+ import servicex .query_core
937
+
938
+ rv = deliver (
928
939
spec ,
929
940
config_path = "tests/example_config.yaml" ,
930
941
progress_bar = ProgressBarFormat .compact ,
931
942
)
932
- deliver (
943
+ servicex .query_core .Query .submit_and_download .assert_called_once ()
944
+ assert rv is not None
945
+ assert rv ["sampleA" ].valid ()
946
+ rv = deliver (
933
947
spec ,
934
948
config_path = "tests/example_config.yaml" ,
935
949
progress_bar = ProgressBarFormat .none ,
936
950
)
951
+ assert rv is not None
952
+ assert rv ["sampleA" ].valid ()
937
953
deliver (
938
954
spec ,
939
955
config_path = "tests/example_config.yaml" ,
940
956
progress_bar = ProgressBarFormat .expanded ,
941
957
)
958
+ assert rv is not None
959
+ assert rv ["sampleA" ].valid ()
942
960
with pytest .raises (ValueError ):
943
961
deliver (
944
962
spec ,
0 commit comments