mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Improve type hints in gpslogger tests (#121173)
This commit is contained in:
parent
4589be2d11
commit
c9acd1711c
@ -45,7 +45,7 @@ async def gpslogger_client(
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
async def setup_zones(hass):
|
||||
async def setup_zones(hass: HomeAssistant) -> None:
|
||||
"""Set up Zone config in HA."""
|
||||
assert await async_setup_component(
|
||||
hass,
|
||||
@ -63,7 +63,7 @@ async def setup_zones(hass):
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def webhook_id(hass, gpslogger_client):
|
||||
async def webhook_id(hass: HomeAssistant, gpslogger_client: TestClient) -> str:
|
||||
"""Initialize the GPSLogger component and get the webhook_id."""
|
||||
await async_process_ha_core_config(
|
||||
hass,
|
||||
@ -81,7 +81,9 @@ async def webhook_id(hass, gpslogger_client):
|
||||
return result["result"].data["webhook_id"]
|
||||
|
||||
|
||||
async def test_missing_data(hass: HomeAssistant, gpslogger_client, webhook_id) -> None:
|
||||
async def test_missing_data(
|
||||
hass: HomeAssistant, gpslogger_client: TestClient, webhook_id: str
|
||||
) -> None:
|
||||
"""Test missing data."""
|
||||
url = f"/api/webhook/{webhook_id}"
|
||||
|
||||
@ -111,8 +113,8 @@ async def test_enter_and_exit(
|
||||
hass: HomeAssistant,
|
||||
entity_registry: er.EntityRegistry,
|
||||
device_registry: dr.DeviceRegistry,
|
||||
gpslogger_client,
|
||||
webhook_id,
|
||||
gpslogger_client: TestClient,
|
||||
webhook_id: str,
|
||||
) -> None:
|
||||
"""Test when there is a known zone."""
|
||||
url = f"/api/webhook/{webhook_id}"
|
||||
@ -148,7 +150,7 @@ async def test_enter_and_exit(
|
||||
|
||||
|
||||
async def test_enter_with_attrs(
|
||||
hass: HomeAssistant, gpslogger_client, webhook_id
|
||||
hass: HomeAssistant, gpslogger_client: TestClient, webhook_id: str
|
||||
) -> None:
|
||||
"""Test when additional attributes are present."""
|
||||
url = f"/api/webhook/{webhook_id}"
|
||||
@ -210,7 +212,7 @@ async def test_enter_with_attrs(
|
||||
reason="The device_tracker component does not support unloading yet."
|
||||
)
|
||||
async def test_load_unload_entry(
|
||||
hass: HomeAssistant, gpslogger_client, webhook_id
|
||||
hass: HomeAssistant, gpslogger_client: TestClient, webhook_id: str
|
||||
) -> None:
|
||||
"""Test that the appropriate dispatch signals are added and removed."""
|
||||
url = f"/api/webhook/{webhook_id}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user