@@ -75,13 +75,6 @@ def test_SgrAstar(self, temp_dir, alma):
7575 # "The Brick", g0.253, is in this one
7676 # assert b'2011.0.00217.S' in result_c['Project code'] # missing cycle 1 data
7777
78- def test_docs_example (self , temp_dir , alma ):
79- alma .cache_location = temp_dir
80-
81- rslt = alma .query (payload = dict (obs_creator_name = '*Ginsburg*' ))
82-
83- assert 'ADS/JAO.ALMA#2013.1.00269.S' in rslt ['obs_publisher_did' ]
84-
8578 def test_freq (self , alma ):
8679 payload = {'frequency' : '85..86' }
8780 result = alma .query (payload )
@@ -141,22 +134,6 @@ def test_m83(self, temp_dir, alma):
141134 # Except it has. On May 18, 2016, there were 47.
142135 assert len (link_list ) >= 47
143136
144- # test re-staging
145- # (has been replaced with warning)
146- # with pytest.raises(requests.HTTPError) as ex:
147- # link_list = alma.stage_data(uids)
148- # assert ex.value.args[0] == ('Received an error 405: this may indicate you have '
149- # 'already staged the data. Try downloading the '
150- # 'file URLs directly with download_files.')
151-
152- # log.warning doesn't actually make a warning
153- # link_list = alma.stage_data(uids)
154- # w = recwarn.pop()
155- # assert (str(w.message) == ('Error 405 received. If you have previously staged the '
156- # 'same UIDs, the result returned is probably correct,'
157- # ' otherwise you may need to create a fresh astroquery.Alma instance.'))
158-
159-
160137 def test_data_proprietary (self , alma ):
161138 # public
162139 assert not alma .is_proprietary ('uid://A001/X12a3/Xe9' )
@@ -198,16 +175,15 @@ def test_data_info(self, temp_dir, alma):
198175 file_url = url
199176 break
200177 assert file_url
201- alma .download_files ([file_url ], temp_dir )
178+ alma .download_files ([file_url ], savedir = temp_dir )
202179 assert os .stat (os .path .join (temp_dir , file )).st_size
203180
204181 # mock downloading an entire program
205182 download_files_mock = Mock ()
206183 alma .download_files = download_files_mock
207184 alma .retrieve_data_from_uid ([uid ])
208185
209- comparison = download_files_mock .mock_calls [0 ][1 ] == data_info_tar [
210- 'access_url' ]
186+ comparison = download_files_mock .mock_calls [0 ][1 ] == data_info_tar ['access_url' ]
211187 assert comparison .all ()
212188
213189 def test_download_data (self , temp_dir , alma ):
@@ -224,7 +200,7 @@ def test_download_data(self, temp_dir, alma):
224200 alma ._download_file = download_mock
225201 urls = [x ['access_url' ] for x in data_info
226202 if fitsre .match (x ['access_url' ])]
227- results = alma .download_files (urls , temp_dir )
203+ results = alma .download_files (urls , savedir = temp_dir )
228204 alma ._download_file .call_count == len (results )
229205 assert len (results ) == len (urls )
230206
0 commit comments