Ejemplo n.º 1
0
def test_query_no_results():
    # Test for issue #1836
    with pytest.warns(NoResultsWarning):
        result = sha.query(ra=219.57741, dec=64.171525, size=0.001)

    assert isinstance(result, Table)
    assert len(result) == 0
Ejemplo n.º 2
0
def test_get_file(patch_get):
    pid_t = sha.query(pid=30080)
    # Get table and fits URLs
    # not used table_url = pid_t['accessUrl'][10]
    image_url = pid_t['accessUrl'][16]
    # Not implemented because running will download file
    # sha.save_file(table_url)
    # sha.save_file(image_url)
    img = sha.get_file(image_url)
Ejemplo n.º 3
0
def test_rqk_t(patch_get):
    rqk_t = sha.query(reqkey=21641216)
Ejemplo n.º 4
0
def test_pid_t(patch_get):
    pid_t = sha.query(pid=30080)
Ejemplo n.º 5
0
def test_nid_t(patch_get):
    nid_t = sha.query(naifid=2003226)
Ejemplo n.º 6
0
def test_pos_t(patch_get):
    # Example queries for SHA API help page
    pos_t = sha.query(ra=163.6136, dec=-11.784, size=0.5)