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

Add typing to tests with single hass argument (2) (#87675)

* Add typing to tests with single hass argument (2)

* a few more
This commit is contained in:
epenet
2023-02-08 08:51:43 +01:00
committed by GitHub
parent 1bbc03d0ba
commit c98b4e3204
50 changed files with 816 additions and 671 deletions

View File

@@ -2,12 +2,12 @@
import asyncio
from datetime import timedelta
from homeassistant.core import callback
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import ratelimit
from homeassistant.util import dt as dt_util
async def test_hit(hass):
async def test_hit(hass: HomeAssistant) -> None:
"""Test hitting the rate limit."""
refresh_called = False
@@ -44,7 +44,7 @@ async def test_hit(hass):
rate_limiter.async_remove()
async def test_miss(hass):
async def test_miss(hass: HomeAssistant) -> None:
"""Test missing the rate limit."""
refresh_called = False
@@ -76,7 +76,7 @@ async def test_miss(hass):
rate_limiter.async_remove()
async def test_no_limit(hass):
async def test_no_limit(hass: HomeAssistant) -> None:
"""Test async_schedule_action always return None when there is no rate limit."""
refresh_called = False