hass-core/tests/components/baf/__init__.py
epenet 3e967700fd
Add missing return type in test __init__ method (part 2) (#123939)
* Add missing return type in test __init__ method (part 2)

* Adjust

* One more

* One more

* More
2024-08-14 17:59:15 +02:00

36 lines
933 B
Python

"""Tests for the Big Ass Fans integration."""
import asyncio
from aiobafi6 import Device
MOCK_UUID = "1234"
MOCK_NAME = "Living Room Fan"
class MockBAFDevice(Device):
"""A simple mock for a BAF Device."""
# pylint: disable-next=super-init-not-called
def __init__(self, async_wait_available_side_effect=None) -> None:
"""Init simple mock."""
self._async_wait_available_side_effect = async_wait_available_side_effect
@property
def dns_sd_uuid(self):
"""Mock the unique id."""
return MOCK_UUID
@property
def name(self):
"""Mock the name of the device."""
return MOCK_NAME
async def async_wait_available(self):
"""Mock async_wait_available."""
if self._async_wait_available_side_effect:
raise self._async_wait_available_side_effect
def async_run(self):
"""Mock async_run."""
return asyncio.Future()