1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add MockPlatform type hints in tests (#120012)

* Add MockPlatform type hints in tests

* Remove useless code

* Improve

* Revert "Improve"

This reverts commit 9ad04f9255.
This commit is contained in:
epenet
2024-06-21 11:04:15 +02:00
committed by GitHub
parent 53022df8a4
commit dc6c1f4e87
7 changed files with 43 additions and 21 deletions

View File

@@ -228,7 +228,7 @@ async def test_set_scan_interval_via_platform(hass: HomeAssistant) -> None:
"""Test the platform setup."""
add_entities([MockEntity(should_poll=True)])
platform = MockPlatform(platform_setup)
platform = MockPlatform(setup_platform=platform_setup)
platform.SCAN_INTERVAL = timedelta(seconds=30)
mock_platform(hass, "platform.test_domain", platform)