mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Add type hints to integration tests (zha) (#88309)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
"""Unit tests for ZHA backup platform."""
|
||||
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
from homeassistant.components.zha.backup import async_post_backup, async_pre_backup
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
|
||||
async def test_pre_backup(hass, setup_zha):
|
||||
async def test_pre_backup(hass: HomeAssistant, setup_zha) -> None:
|
||||
"""Test backup creation when `async_pre_backup` is called."""
|
||||
with patch("zigpy.backups.BackupManager.create_backup", AsyncMock()) as backup_mock:
|
||||
await setup_zha()
|
||||
@@ -14,7 +14,7 @@ async def test_pre_backup(hass, setup_zha):
|
||||
backup_mock.assert_called_once_with(load_devices=True)
|
||||
|
||||
|
||||
async def test_post_backup(hass, setup_zha):
|
||||
async def test_post_backup(hass: HomeAssistant, setup_zha) -> None:
|
||||
"""Test no-op `async_post_backup`."""
|
||||
await setup_zha()
|
||||
await async_post_backup(hass)
|
||||
|
||||
Reference in New Issue
Block a user