mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add missing return type in test __init__ method (part 3) (#123940)
This commit is contained in:
parent
5e6f8373e1
commit
178482068d
@ -7,7 +7,7 @@ import pytest
|
|||||||
|
|
||||||
from homeassistant.components.alexa import config, smart_home
|
from homeassistant.components.alexa import config, smart_home
|
||||||
from homeassistant.components.alexa.const import CONF_ENDPOINT, CONF_FILTER, CONF_LOCALE
|
from homeassistant.components.alexa.const import CONF_ENDPOINT, CONF_FILTER, CONF_LOCALE
|
||||||
from homeassistant.core import Context, callback
|
from homeassistant.core import Context, HomeAssistant, callback
|
||||||
from homeassistant.helpers import entityfilter
|
from homeassistant.helpers import entityfilter
|
||||||
|
|
||||||
from tests.common import async_mock_service
|
from tests.common import async_mock_service
|
||||||
@ -28,7 +28,7 @@ class MockConfig(smart_home.AlexaConfig):
|
|||||||
"camera.test": {"display_categories": "CAMERA"},
|
"camera.test": {"display_categories": "CAMERA"},
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, hass):
|
def __init__(self, hass: HomeAssistant) -> None:
|
||||||
"""Mock Alexa config."""
|
"""Mock Alexa config."""
|
||||||
super().__init__(
|
super().__init__(
|
||||||
hass,
|
hass,
|
||||||
|
@ -124,7 +124,12 @@ def config_flow_handler(
|
|||||||
class OAuthFixture:
|
class OAuthFixture:
|
||||||
"""Fixture to facilitate testing an OAuth flow."""
|
"""Fixture to facilitate testing an OAuth flow."""
|
||||||
|
|
||||||
def __init__(self, hass, hass_client, aioclient_mock):
|
def __init__(
|
||||||
|
self,
|
||||||
|
hass: HomeAssistant,
|
||||||
|
hass_client: ClientSessionGenerator,
|
||||||
|
aioclient_mock: AiohttpClientMocker,
|
||||||
|
) -> None:
|
||||||
"""Initialize OAuthFixture."""
|
"""Initialize OAuthFixture."""
|
||||||
self.hass = hass
|
self.hass = hass
|
||||||
self.hass_client = hass_client
|
self.hass_client = hass_client
|
||||||
|
@ -17,7 +17,7 @@ from homeassistant.core import HomeAssistant
|
|||||||
class SimpleMediaPlayer(mp.MediaPlayerEntity):
|
class SimpleMediaPlayer(mp.MediaPlayerEntity):
|
||||||
"""Media player test class."""
|
"""Media player test class."""
|
||||||
|
|
||||||
def __init__(self, hass):
|
def __init__(self, hass: HomeAssistant) -> None:
|
||||||
"""Initialize the test media player."""
|
"""Initialize the test media player."""
|
||||||
self.hass = hass
|
self.hass = hass
|
||||||
self._volume = 0
|
self._volume = 0
|
||||||
|
@ -56,7 +56,12 @@ def nest_test_config() -> NestTestConfig:
|
|||||||
class OAuthFixture:
|
class OAuthFixture:
|
||||||
"""Simulate the oauth flow used by the config flow."""
|
"""Simulate the oauth flow used by the config flow."""
|
||||||
|
|
||||||
def __init__(self, hass, hass_client_no_auth, aioclient_mock):
|
def __init__(
|
||||||
|
self,
|
||||||
|
hass: HomeAssistant,
|
||||||
|
hass_client_no_auth: ClientSessionGenerator,
|
||||||
|
aioclient_mock: AiohttpClientMocker,
|
||||||
|
) -> None:
|
||||||
"""Initialize OAuthFixture."""
|
"""Initialize OAuthFixture."""
|
||||||
self.hass = hass
|
self.hass = hass
|
||||||
self.hass_client = hass_client_no_auth
|
self.hass_client = hass_client_no_auth
|
||||||
|
@ -55,7 +55,7 @@ def validate_config(config):
|
|||||||
class MockMediaPlayer(media_player.MediaPlayerEntity):
|
class MockMediaPlayer(media_player.MediaPlayerEntity):
|
||||||
"""Mock media player for testing."""
|
"""Mock media player for testing."""
|
||||||
|
|
||||||
def __init__(self, hass, name):
|
def __init__(self, hass: HomeAssistant, name: str) -> None:
|
||||||
"""Initialize the media player."""
|
"""Initialize the media player."""
|
||||||
self.hass = hass
|
self.hass = hass
|
||||||
self._name = name
|
self._name = name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user