@@ -906,6 +906,38 @@ def test_datalink_querier_load_data_fits(mock_datalink_querier_fits):
906
906
assert not os .path .exists ('datalink_output.zip' )
907
907
908
908
909
+ def test_load_data_vot (monkeypatch , tmp_path , tmp_path_factory ):
910
+ path = Path (os .getcwd () + '/' + 'datalink_output.zip' )
911
+
912
+ with open (DL_PRODUCTS_VOT , 'rb' ) as file :
913
+ zip_bytes = file .read ()
914
+
915
+ path .write_bytes (zip_bytes )
916
+
917
+ def load_data_monkeypatched (self , params_dict , output_file , verbose ):
918
+ assert params_dict == {
919
+ "VALID_DATA" : "true" ,
920
+ "ID" : "1,2,3,4" ,
921
+ "FORMAT" : "votable" ,
922
+ "RETRIEVAL_TYPE" : "epoch_photometry" ,
923
+ "DATA_STRUCTURE" : "INDIVIDUAL" ,
924
+ "USE_ZIP_ALWAYS" : "true" }
925
+ assert output_file == os .getcwd () + '/' + 'datalink_output.zip'
926
+ assert verbose is True
927
+
928
+ monkeypatch .setattr (TapPlus , "load_data" , load_data_monkeypatched )
929
+
930
+ GAIA_QUERIER .load_data (
931
+ valid_data = True ,
932
+ ids = "1,2,3,4" ,
933
+ format = 'votable' ,
934
+ retrieval_type = "epoch_photometry" ,
935
+ verbose = True ,
936
+ dump_to_file = True )
937
+
938
+ path .unlink ()
939
+
940
+
909
941
@pytest .mark .skip (reason = "Thes fits files generate an error relatate to the unit 'log(cm.s**-2)" )
910
942
def test_load_data_fits (monkeypatch , tmp_path , tmp_path_factory ):
911
943
path = Path (os .getcwd () + '/' + 'datalink_output.zip' )
0 commit comments