@@ -275,7 +275,7 @@ def test_observations_download_products(self, tmpdir):
275
275
assert os .path .isfile (row ['Local Path' ])
276
276
277
277
# just get the curl script
278
- result = mast .Observations .download_products (test_obs [0 ]["obsid" ],
278
+ result = mast .Observations .download_products (test_obs_id [0 ]["obsid" ],
279
279
download_dir = str (tmpdir ),
280
280
curl_flag = True ,
281
281
productType = ["SCIENCE" ],
@@ -284,16 +284,16 @@ def test_observations_download_products(self, tmpdir):
284
284
assert os .path .isfile (result ['Local Path' ][0 ])
285
285
286
286
# check for row input
287
- result1 = mast .Observations .get_product_list (test_obs [0 ]["obsid" ])
287
+ result1 = mast .Observations .get_product_list (test_obs_id [0 ]["obsid" ])
288
288
result2 = mast .Observations .download_products (result1 [0 ])
289
289
assert isinstance (result2 , Table )
290
290
assert os .path .isfile (result2 ['Local Path' ][0 ])
291
291
assert len (result2 ) == 1
292
292
293
- def test_observations_download_products_noduplicates ( self , tmpdir ):
293
+ def test_observations_download_products_no_duplicates ( tmpdir ):
294
294
295
- # Pull products for a NIRSpec MSA observation with 6 known duplicates
296
- # of the MSA configuration file
295
+ # Pull products for a JWST NIRSpec MSA observation with 6 known
296
+ # duplicates of the MSA configuration file, propID=2736
297
297
products = mast .Observations .get_product_list ("87602009" )
298
298
299
299
# Filter out everything but the MSA config file
@@ -310,6 +310,15 @@ def test_observations_download_products_noduplicates(self, tmpdir):
310
310
# Check that it downloads the MSA config file only once
311
311
assert len (manifest ) == 1
312
312
313
+ # enable access to public AWS S3 bucket
314
+ mast .Observations .enable_cloud_dataset ()
315
+
316
+ # Check duplicate cloud URIs as well
317
+ with pytest .warns (DuplicateResultsWarning ):
318
+ uris = mast .Observations .get_cloud_uris (products )
319
+
320
+ assert len (uris ) == 1
321
+
313
322
def test_observations_download_file (self , tmpdir ):
314
323
315
324
# enabling cloud connection
0 commit comments