mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Improve type hints in mailgun tests (#123789)
This commit is contained in:
parent
2b968dfd9a
commit
3660c2dbb4
@ -10,7 +10,7 @@ from homeassistant import config_entries
|
|||||||
from homeassistant.components import mailgun, webhook
|
from homeassistant.components import mailgun, webhook
|
||||||
from homeassistant.config import async_process_ha_core_config
|
from homeassistant.config import async_process_ha_core_config
|
||||||
from homeassistant.const import CONF_API_KEY, CONF_DOMAIN
|
from homeassistant.const import CONF_API_KEY, CONF_DOMAIN
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import Event, HomeAssistant, callback
|
||||||
from homeassistant.data_entry_flow import FlowResultType
|
from homeassistant.data_entry_flow import FlowResultType
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ async def http_client(
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
async def webhook_id_with_api_key(hass):
|
async def webhook_id_with_api_key(hass: HomeAssistant) -> str:
|
||||||
"""Initialize the Mailgun component and get the webhook_id."""
|
"""Initialize the Mailgun component and get the webhook_id."""
|
||||||
await async_setup_component(
|
await async_setup_component(
|
||||||
hass,
|
hass,
|
||||||
@ -53,7 +53,7 @@ async def webhook_id_with_api_key(hass):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
async def webhook_id_without_api_key(hass):
|
async def webhook_id_without_api_key(hass: HomeAssistant) -> str:
|
||||||
"""Initialize the Mailgun component and get the webhook_id w/o API key."""
|
"""Initialize the Mailgun component and get the webhook_id w/o API key."""
|
||||||
await async_setup_component(hass, mailgun.DOMAIN, {})
|
await async_setup_component(hass, mailgun.DOMAIN, {})
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ async def webhook_id_without_api_key(hass):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
async def mailgun_events(hass):
|
async def mailgun_events(hass: HomeAssistant) -> list[Event]:
|
||||||
"""Return a list of mailgun_events triggered."""
|
"""Return a list of mailgun_events triggered."""
|
||||||
events = []
|
events = []
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user