Skip to content

Commit

Permalink
Add extra bypass input tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rrooggiieerr committed Jun 26, 2024
1 parent 4221f4b commit 2c45215
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions tests/test_unii_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,32 @@ async def test_inputs(self):
if unii_input.status != UNiiInputState.DISABLED:
_LOGGER.info(unii_input)

async def test_bypass_input(self):
await self._unii.unbypass_input(1, self.user_code)
result = await self._unii.bypass_input(1, self.user_code)
async def test_bypass_wired_input(self):
await self._unii.unbypass_input(2, self.user_code)
result = await self._unii.bypass_input(2, self.user_code)
self.assertTrue(result, "Failed to bypass input")

async def test_bypass_input_fail(self):
await self._unii.unbypass_input(1, self.user_code)
result = await self._unii.bypass_input(1, "")
async def test_bypass_wired_input_fail(self):
await self._unii.unbypass_input(2, self.user_code)
result = await self._unii.bypass_input(2, "")
self.assertFalse(result)

async def test_unbypass_input(self):
await self._unii.bypass_input(1, self.user_code)
result = await self._unii.unbypass_input(1, self.user_code)
async def test_unbypass_wired_input(self):
await self._unii.bypass_input(2, self.user_code)
result = await self._unii.unbypass_input(2, self.user_code)
self.assertTrue(result, "Failed to bypass input")

async def test_unbypass_input_fail(self):
await self._unii.bypass_input(1, self.user_code)
result = await self._unii.unbypass_input(1, "")
async def test_unbypass_wired_input_fail(self):
await self._unii.bypass_input(2, self.user_code)
result = await self._unii.unbypass_input(2, "")
self.assertFalse(result)

async def test_bypass_keypad_input(self):
await self._unii.unbypass_input(701, self.user_code)
result = await self._unii.bypass_input(701, self.user_code)
self.assertTrue(result, "Failed to bypass input")

async def test_bypass_keypad_input_fail(self):
await self._unii.unbypass_input(701, self.user_code)
result = await self._unii.bypass_input(701, "")
self.assertFalse(result)

0 comments on commit 2c45215

Please sign in to comment.