From 180299d5058e4b4f7a0f48a0251c0d8686d5d1ab Mon Sep 17 00:00:00 2001 From: David Sanmartim Date: Tue, 12 Dec 2023 18:53:33 -0300 Subject: [PATCH] In maintel/test_mtcs.py add test_slew_ephem_target --- tests/maintel/test_mtcs.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/maintel/test_mtcs.py b/tests/maintel/test_mtcs.py index 0fc30de0..aa315cda 100644 --- a/tests/maintel/test_mtcs.py +++ b/tests/maintel/test_mtcs.py @@ -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()