File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
astroquery/esa/hubble/tests Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 12
12
import tempfile
13
13
14
14
import os
15
+ import numpy as np
15
16
16
17
import pytest
17
18
from astroquery .esa .hubble import ESAHubble
18
19
from astropy import coordinates
19
- import random
20
20
21
21
esa_hubble = ESAHubble ()
22
22
@@ -58,7 +58,7 @@ def test_query_tap_async(self):
58
58
59
59
def test_download_product (self ):
60
60
result = esa_hubble .query_tap (query = self .hst_query )
61
- observation_id = random .choice (result ['observation_id' ])
61
+ observation_id = np . random .choice (( result ['observation_id' ]) )
62
62
temp_file = self .temp_folder .name + "/" + observation_id + ".tar"
63
63
esa_hubble .download_product (observation_id = observation_id ,
64
64
filename = temp_file )
@@ -67,7 +67,7 @@ def test_download_product(self):
67
67
def test_get_artifact (self ):
68
68
result = esa_hubble .query_tap (query = self .top_artifact_query )
69
69
assert "artifact_id" in result .keys ()
70
- artifact_id = random .choice (result ["artifact_id" ])
70
+ artifact_id = np . random .choice (result ["artifact_id" ])
71
71
temp_file = self .temp_folder .name + "/" + artifact_id + ".gz"
72
72
esa_hubble .get_artifact (artifact_id = artifact_id , filename = temp_file )
73
73
assert os .path .exists (temp_file )
You can’t perform that action at this time.
0 commit comments