From d664d538632d5f692f9230e782db3129ebc69726 Mon Sep 17 00:00:00 2001 From: tinumide Date: Wed, 10 Feb 2021 13:08:51 +0100 Subject: [PATCH 1/2] initial commit --- astroquery/ogle/tests/test_ogle_remote.py | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 astroquery/ogle/tests/test_ogle_remote.py diff --git a/astroquery/ogle/tests/test_ogle_remote.py b/astroquery/ogle/tests/test_ogle_remote.py new file mode 100644 index 0000000000..866ab23f57 --- /dev/null +++ b/astroquery/ogle/tests/test_ogle_remote.py @@ -0,0 +1,30 @@ + +import pytest +import astropy.units as u +from astropy.coordinates import SkyCoord + +from .. import Ogle + + +@pytest.mark.remote_data +def test_ogle_single(): + co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic') + response = Ogle.query_region(coord=co) + assert len(response) == 1 + + +@pytest.mark.remote_data +def test_ogle_list(): + co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic') + co_list = [co, co, co] + response = Ogle.query_region(coord=co_list) + assert len(response) == 3 + assert response['RA/Lon'][0] == response['RA/Lon'][1] == response['RA/Lon'][2] + + +@pytest.mark.remote_data +def test_ogle_list_values(): + co_list = [[0, 0, 0], [3, 3, 3]] + response = Ogle.query_region(coord=co_list) + assert len(response) == 3 + assert response['RA/Lon'][0] == response['RA/Lon'][1] == response['RA/Lon'][2] From 744d4a34fa3f5f514f3f1e525822360dd97e28e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Wed, 23 Feb 2022 20:19:10 -0800 Subject: [PATCH 2/2] Fix column name in tests --- astroquery/ogle/tests/test_ogle_remote.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/astroquery/ogle/tests/test_ogle_remote.py b/astroquery/ogle/tests/test_ogle_remote.py index 866ab23f57..5fc6df8c63 100644 --- a/astroquery/ogle/tests/test_ogle_remote.py +++ b/astroquery/ogle/tests/test_ogle_remote.py @@ -19,7 +19,7 @@ def test_ogle_list(): co_list = [co, co, co] response = Ogle.query_region(coord=co_list) assert len(response) == 3 - assert response['RA/Lon'][0] == response['RA/Lon'][1] == response['RA/Lon'][2] + assert response['RA[hr]'][0] == response['RA[hr]'][1] == response['RA[hr]'][2] @pytest.mark.remote_data @@ -27,4 +27,4 @@ def test_ogle_list_values(): co_list = [[0, 0, 0], [3, 3, 3]] response = Ogle.query_region(coord=co_list) assert len(response) == 3 - assert response['RA/Lon'][0] == response['RA/Lon'][1] == response['RA/Lon'][2] + assert response['RA[hr]'][0] == response['RA[hr]'][1] == response['RA[hr]'][2]