From a2c85a0ac256eae6bd41a8a48c045e92db0b846b Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 3 Oct 2024 18:18:08 +0200 Subject: [PATCH] Remove test workaround from snooz (#127465) --- tests/components/snooz/__init__.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/tests/components/snooz/__init__.py b/tests/components/snooz/__init__.py index c314fde5c90b5..16827b54ac45b 100644 --- a/tests/components/snooz/__init__.py +++ b/tests/components/snooz/__init__.py @@ -6,8 +6,7 @@ from unittest.mock import patch from pysnooz.commands import SnoozCommandData -from pysnooz.device import DisconnectionReason -from pysnooz.testing import MockSnoozDevice as ParentMockSnoozDevice +from pysnooz.testing import MockSnoozDevice from homeassistant.components.snooz.const import DOMAIN from homeassistant.const import CONF_ADDRESS, CONF_TOKEN @@ -67,18 +66,6 @@ class SnoozFixture: device: MockSnoozDevice -class MockSnoozDevice(ParentMockSnoozDevice): - """Used for testing integration with Bleak. - - Adjusted for https://github.com/AustinBrunkhorst/pysnooz/issues/6 - """ - - def _on_device_disconnected(self, e) -> None: - if self._is_manually_disconnecting: - e.kwargs.set("reason", DisconnectionReason.USER) - return super()._on_device_disconnected(e) - - async def create_mock_snooz( connected: bool = True, initial_state: SnoozCommandData = SnoozCommandData(on=False, volume=0),