Skip to content

Commit

Permalink
Add test of the ignore feature to EnableATCS, OfflineATCS, and Standb…
Browse files Browse the repository at this point in the history
…yATCS

In order to test the implementation of the ignore feature in the base scripts
`EnableGroup`, `StandbyGroup` and `OfflineGroup`.
  • Loading branch information
MarcoRocchietti committed Dec 18, 2024
1 parent 96123ac commit 5392d21
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_auxtel_enable_atcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,19 @@ class TestEnableATTCS(
async def basic_make_script(self, index):
self.script = EnableATTCS(index=index)
self.atcs_mock = ATCSMock()
self.script._attcs.disable_checks_for_components = unittest.mock.Mock()

return (self.script, self.atcs_mock)

async def test_configure_ignore(self):
async with self.make_script():
components = ["atmcs", "notcomp", "athexapod"]
await self.configure_script(ignore=components)

self.script._attcs.disable_checks_for_components.assert_called_once_with(
components=components
)

async def test_run(self):
async with self.make_script():
await self.configure_script()
Expand Down
10 changes: 10 additions & 0 deletions tests/test_auxtel_offline_atcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,19 @@ class TestOfflineATCS(
async def basic_make_script(self, index):
self.script = OfflineATCS(index=index)
self.atcs_mock = ATCSMock()
self.script._atcs.disable_checks_for_components = unittest.mock.Mock()

return (self.script, self.atcs_mock)

async def test_configure_ignore(self):
async with self.make_script():
components = ["atmcs", "notcomp", "athexapod"]
await self.configure_script(ignore=components)

self.script._atcs.disable_checks_for_components.assert_called_once_with(
components=components
)

async def test_components(self):
async with self.make_script():
for component in self.script.group.components_attr:
Expand Down
10 changes: 10 additions & 0 deletions tests/test_auxtel_standby_atcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,19 @@ class TestStandbyATCS(
async def basic_make_script(self, index):
self.script = StandbyATCS(index=index)
self.atcs_mock = ATCSMock()
self.script._atcs.disable_checks_for_components = unittest.mock.Mock()

return (self.script, self.atcs_mock)

async def test_configure_ignore(self):
async with self.make_script():
components = ["atmcs", "notcomp", "athexapod"]
await self.configure_script(ignore=components)

self.script._atcs.disable_checks_for_components.assert_called_once_with(
components=components
)

async def test_components(self):
async with self.make_script():
for component in self.script.group.components_attr:
Expand Down

0 comments on commit 5392d21

Please sign in to comment.