@@ -294,21 +294,37 @@ def test_observations_download_file(self, tmpdir):
294294 result = mast .Observations .download_file (uri )
295295 assert result == ('COMPLETE' , None , None )
296296
297- def test_get_cloud_uri (self )
298- test_obs_id = '44308 '
297+ def test_get_cloud_uri (self ):
298+ test_obs_id = '25568122 '
299299
300300 # get a product list
301- product = mast .Observations .get_product_list (test_obs_id )
301+ product = mast .Observations .get_product_list (test_obs_id )[ 24 ]
302302
303- assert len (product ) > 0 , 'No products found for OBSID {}. Unable to move forward with getting URIs from the cloud.' . format ( test_obs_id )
303+ assert len (product ) > 0 , f 'No product found for OBSID { test_obs_id } . Unable to move forward with getting URIs from the cloud.'
304304
305305 # enable access to public AWS S3 bucket
306306 mast .Observations .enable_cloud_dataset ()
307307
308308 # get uri
309- mast .Observations .get_cloud_uri (product )
309+ uri = mast .Observations .get_cloud_uri (product )
310310
311- #def test_get_cloud_uris(self, )
311+ assert len (uri ) > 0 , f'Product for OBSID { test_obs_id } was not found in the cloud.'
312+
313+ def test_get_cloud_uris (self ):
314+ test_obs_id = '25568122'
315+
316+ # get a product list
317+ products = mast .Observations .get_product_list (test_obs_id )[24 :]
318+
319+ assert len (products ) > 0 , f'No products found for OBSID { test_obs_id } . Unable to move forward with getting URIs from the cloud.'
320+
321+ # enable access to public AWS S3 bucket
322+ mast .Observations .enable_cloud_dataset ()
323+
324+ # get uris
325+ uris = mast .Observations .get_cloud_uris (products )
326+
327+ assert len (uris ) > 0 , f'Products for OBSID { test_obs_id } were not found in the cloud.'
312328
313329 ######################
314330 # CatalogClass tests #
0 commit comments