File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -321,6 +321,27 @@ def test_cutout_no_args(patch_get):
321
321
assert "Please provide cutout parameters such as coordinates, band or channel." in str (excinfo .value )
322
322
323
323
324
+ def test_cutout_unauthorised (patch_get ):
325
+ prefix = 'https://somewhere/casda/datalink/links?'
326
+ access_urls = [prefix + 'cube-244' ]
327
+ table = Table ([Column (data = access_urls , name = 'access_url' )])
328
+ ra = 333.9092 * u .deg
329
+ dec = - 45.8418 * u .deg
330
+ radius = 30 * u .arcmin
331
+ centre = SkyCoord (ra , dec )
332
+
333
+ with pytest .raises (ValueError ) as excinfo :
334
+ Casda .cutout (table , coordinates = centre , radius = radius , verbose = True )
335
+ assert "Credentials must be supplied to download CASDA image data" in str (excinfo .value )
336
+
337
+
338
+ def test_cutout_no_table ():
339
+ casda = Casda ('user' , 'password' )
340
+ casda .POLL_INTERVAL = 1
341
+ result = casda .cutout (None )
342
+ assert result == []
343
+
344
+
324
345
def test_args_to_payload_band ():
325
346
casda = Casda ('user' , 'password' )
326
347
payload = casda ._args_to_payload (band = (0.195 * u .m , 0.215 * u .m ))
You can’t perform that action at this time.
0 commit comments