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

Add type hints to integration tests (part 14) (#88005)

This commit is contained in:
epenet
2023-02-15 10:31:43 +01:00
committed by GitHub
parent a0e0feb444
commit 6c430e03bc
51 changed files with 630 additions and 331 deletions

View File

@@ -3,8 +3,10 @@ import datetime
import json
from freezegun import freeze_time
import requests_mock
from homeassistant.components.metoffice.const import ATTRIBUTION, DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import async_get as get_dev_reg
from .const import (
@@ -23,7 +25,9 @@ from tests.common import MockConfigEntry, load_fixture
@freeze_time(datetime.datetime(2020, 4, 25, 12, tzinfo=datetime.timezone.utc))
async def test_one_sensor_site_running(hass, requests_mock):
async def test_one_sensor_site_running(
hass: HomeAssistant, requests_mock: requests_mock.Mocker
) -> None:
"""Test the Met Office sensor platform."""
# all metoffice test data encapsulated in here
mock_json = json.loads(load_fixture("metoffice.json"))
@@ -69,7 +73,9 @@ async def test_one_sensor_site_running(hass, requests_mock):
@freeze_time(datetime.datetime(2020, 4, 25, 12, tzinfo=datetime.timezone.utc))
async def test_two_sensor_sites_running(hass, requests_mock):
async def test_two_sensor_sites_running(
hass: HomeAssistant, requests_mock: requests_mock.Mocker
) -> None:
"""Test we handle two sets of sensors running for two different sites."""
# all metoffice test data encapsulated in here