Add missing M1 and phase coefficient tests.
@@ -81,6 +81,29 @@ class TestHorizonsClass:
'stop': '2080-02-01',
'step': '3h'})
+ res = obj.ephemerides(closest_apparition=True)
+
+ assert len(res) == 249
+
+ res = res[0]
+
+ assert res['targetname'] == "73P/Schwassmann-Wachmann 3"
+ assert res['datetime_str'] == "2080-Jan-01 00:00"
+ assert res['solar_presence'] == "*"
+ assert res['flags'] == "m"
+ assert res['elongFlag'] == '/L'
+
+ assert 'H' not in res
+ assert 'G' not in res
+
+ def test_ephemerides_query_four(self):
+ # checks for missing M1 with a comet
+ obj = jplhorizons.Horizons(id='167P', id_type='designation',
+ location='I41',
+ epochs={'start': '2080-01-01',
+ 'stop': '2080-02-01',
+ 'step': '3h'})
+
res = obj.ephemerides(closest_apparition=True,
no_fragments=True)
@@ -88,7 +111,35 @@ class TestHorizonsClass:
res = res[0]
- assert res['targetname'] == "73P/Schwassmann-Wachmann 3"
+ assert res['targetname'] == "167P/CINEOS"
+ assert res['datetime_str'] == "2080-Jan-01 00:00"
+ assert res['solar_presence'] == "*"
+ assert res['flags'] == "m"
+ assert res['elongFlag'] == '/L'
+
+ assert 'H' not in res
+ assert 'G' not in res
+ assert 'M1' not in res
+ assert 'k1' not in res
+ assert 'M2' in res
+ assert 'k2' in res
+ assert 'phasecoeff' in res
+
+ def test_ephemerides_query_five(self):
+ # checks for missing phase coefficient with a comet
+ obj = jplhorizons.Horizons(id='12P', id_type='designation',
+ location='I41',
+ epochs={'start': '2080-01-01',
+ 'stop': '2080-02-01',
+ 'step': '3h'})
+
+ res = obj.ephemerides(closest_apparition=True)
+
+ assert len(res) == 249
+
+ res = res[0]
+
+ assert res['targetname'] == "12P/Pons-Brooks"
assert res['datetime_str'] == "2080-Jan-01 00:00"
assert res['solar_presence'] == "*"
assert res['flags'] == "m"
@@ -96,6 +147,11 @@ class TestHorizonsClass:
assert 'H' not in res
assert 'G' not in res
+ assert 'M1' in res
+ assert 'k1' in res
+ assert 'M2' in res
+ assert 'k2' in res
+ assert 'phasecoeff' not in res
def test_ephemerides_query_raw(self):
res = (jplhorizons.Horizons(id='Ceres', location='500',
