Skip to content

Commit

Permalink
In maintel/test_mtcs.py add test_slew_ephem_target
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanmartim committed Dec 12, 2023
1 parent 67f3648 commit 180299d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/maintel/test_mtcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,31 @@ async def test_set_azel_slew_checks(self) -> None:
for comp in {"mtdome", "mtdometrajectory"}:
assert not getattr(check, comp)

async def test_slew_ephem_target(self) -> None:
await self.mtcs.enable()
await self.mtcs.assert_all_enabled()
await self.mtcs.enable_dome_following()

ephem_file = "test_ephem.json"
target_name = "Chariklo"
rot_sky = 0.0

await self.mtcs.slew_ephem_target(
ephem_file=ephem_file, target_name=target_name, rot_sky=rot_sky
)

self.mtcs.rem.mtptg.cmd_ephemTarget.set.assert_called_with(
ephemFile=ephem_file,
targetName=target_name,
dRA=0.0,
dDec=0.0,
rotPA=Angle(rot_sky, unit=units.deg).deg,
validateOnly=False,
timeout=240.0,
)

self.atcs.rem.mtptg.cmd_stopTracking.start.assert_not_awaited()

async def test_slew_object(self) -> None:
await self.mtcs.enable()
await self.mtcs.assert_all_enabled()
Expand Down

0 comments on commit 180299d

Please sign in to comment.