diff options
| author | Yuval Adam <_@yuv.al> | 2020-09-28 14:39:59 +0300 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2020-09-28 14:39:59 +0300 |
| commit | d3caed4241328258dee6190463bae8b4b5f3800d (patch) | |
| tree | 0077dd6f31bc5c81124c34b35f215ef1648c275c /iss/tests | |
| parent | 6ca40df643842932c9b36557ce69fd7a2ed0e6c4 (diff) | |
Use grouped predictions for dates in table
Diffstat (limited to 'iss/tests')
| -rw-r--r-- | iss/tests/test_predictions.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/iss/tests/test_predictions.py b/iss/tests/test_predictions.py index 85dcf0a..29b939b 100644 --- a/iss/tests/test_predictions.py +++ b/iss/tests/test_predictions.py @@ -65,3 +65,15 @@ def test_get_predictions(): assert preds[0]["rise"]["azimuth"] == 347 assert preds[0]["culminate"]["degrees"] == 1 assert preds[0]["set"]["distance"] == 2364 + + +def test_get_grouped_predictions(): + start = 2459117.245895914 + p = Predictions( + lat=32.0853, lng=34.7817, tz="Asia/Jerusalem", start=start, tle_file=STATIONS + ) + preds = p.get_grouped_predictions() + assert "2020-09-28" in preds + assert preds["2020-09-28"][0]["rise"]["time"] == "10:14:44Z" + assert preds["2020-09-28"][1]["culminate"]["time"] == "11:51:14Z" + assert preds["2020-09-28"][1]["set"]["time"] == "11:56:36Z" |
