Skip to content

Commit

Permalink
Add some trivial tests for target_summary
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanconn committed Dec 10, 2024
1 parent 0ca8469 commit 25aca8f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions mica/report/tests/test_report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import mica.report.report


def test_target_summary_or():
"""
Test the target_summary method for an OR.
This test is for obsid 2121 which is quite historical at this point and should
not change."""
obsid = 2121
summary = mica.report.report.target_summary(obsid)
assert summary is not None
assert isinstance(summary, dict)
assert summary["prop_num"] == 2700413
assert summary["lts_lt_plan"] is None
assert summary["soe_st_sched_date"] == "Nov 14 2000 12:49AM"

def test_target_summary_er():
"""
Test that target_summary for an ER obsid returns None"""
obsid = 54000
summary = mica.report.report.target_summary(obsid)
assert summary is None

0 comments on commit 25aca8f

Please sign in to comment.