Correct tests for gardena (#96806)

pull/96805/head^2
Joakim Plate 2023-07-18 07:22:48 +02:00 committed by GitHub
parent eb60dc65ec
commit a9f7522857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,7 @@
from datetime import timedelta
from unittest.mock import Mock
from gardena_bluetooth.const import Battery
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.gardena_bluetooth import DeviceUnavailable
@ -20,10 +21,13 @@ from tests.common import MockConfigEntry, async_fire_time_changed
async def test_setup(
hass: HomeAssistant,
mock_entry: MockConfigEntry,
mock_read_char_raw: dict[str, bytes],
snapshot: SnapshotAssertion,
) -> None:
"""Test setup creates expected devices."""
mock_read_char_raw[Battery.battery_level.uuid] = Battery.battery_level.encode(100)
mock_entry.add_to_hass(hass)
await hass.config_entries.async_setup(mock_entry.entry_id)
await hass.async_block_till_done()