diff --git a/tests/components/bluesound/conftest.py b/tests/components/bluesound/conftest.py index 02c73bcd62f..5d81b6863c6 100644 --- a/tests/components/bluesound/conftest.py +++ b/tests/components/bluesound/conftest.py @@ -40,7 +40,7 @@ def sync_status() -> SyncStatus: @pytest.fixture -def mock_setup_entry() -> Generator[AsyncMock, None, None]: +def mock_setup_entry() -> Generator[AsyncMock]: """Override async_setup_entry.""" with patch( "homeassistant.components.bluesound.async_setup_entry", return_value=True diff --git a/tests/components/bryant_evolution/conftest.py b/tests/components/bryant_evolution/conftest.py index cc9dfbec1e1..fb12d7ebf29 100644 --- a/tests/components/bryant_evolution/conftest.py +++ b/tests/components/bryant_evolution/conftest.py @@ -15,7 +15,7 @@ from tests.common import MockConfigEntry @pytest.fixture -def mock_setup_entry() -> Generator[AsyncMock, None, None]: +def mock_setup_entry() -> Generator[AsyncMock]: """Override async_setup_entry.""" with patch( "homeassistant.components.bryant_evolution.async_setup_entry", return_value=True @@ -31,7 +31,7 @@ for the Bryant Evolution integration. @pytest.fixture(autouse=True) -def mock_evolution_client_factory() -> Generator[AsyncMock, None, None]: +def mock_evolution_client_factory() -> Generator[AsyncMock]: """Mock an Evolution client.""" with patch( "evolutionhttp.BryantEvolutionLocalClient.get_client", diff --git a/tests/components/bryant_evolution/test_climate.py b/tests/components/bryant_evolution/test_climate.py index 42944c32bc2..0b527e02a10 100644 --- a/tests/components/bryant_evolution/test_climate.py +++ b/tests/components/bryant_evolution/test_climate.py @@ -52,7 +52,7 @@ async def test_setup_integration_success( async def test_set_temperature_mode_cool( hass: HomeAssistant, mock_evolution_entry: MockConfigEntry, - mock_evolution_client_factory: Generator[AsyncMock, None, None], + mock_evolution_client_factory: Generator[AsyncMock], freezer: FrozenDateTimeFactory, ) -> None: """Test setting the temperature in cool mode.""" @@ -83,7 +83,7 @@ async def test_set_temperature_mode_cool( async def test_set_temperature_mode_heat( hass: HomeAssistant, mock_evolution_entry: MockConfigEntry, - mock_evolution_client_factory: Generator[AsyncMock, None, None], + mock_evolution_client_factory: Generator[AsyncMock], freezer: FrozenDateTimeFactory, ) -> None: """Test setting the temperature in heat mode.""" @@ -111,7 +111,7 @@ async def test_set_temperature_mode_heat( async def test_set_temperature_mode_heat_cool( hass: HomeAssistant, mock_evolution_entry: MockConfigEntry, - mock_evolution_client_factory: Generator[AsyncMock, None, None], + mock_evolution_client_factory: Generator[AsyncMock], freezer: FrozenDateTimeFactory, ) -> None: """Test setting the temperature in heat_cool mode.""" @@ -147,7 +147,7 @@ async def test_set_temperature_mode_heat_cool( async def test_set_fan_mode( hass: HomeAssistant, mock_evolution_entry: MockConfigEntry, - mock_evolution_client_factory: Generator[AsyncMock, None, None], + mock_evolution_client_factory: Generator[AsyncMock], ) -> None: """Test that setting fan mode works.""" mock_client = await mock_evolution_client_factory(1, 1, "/dev/unused") @@ -175,7 +175,7 @@ async def test_set_fan_mode( async def test_set_hvac_mode( hass: HomeAssistant, mock_evolution_entry: MockConfigEntry, - mock_evolution_client_factory: Generator[AsyncMock, None, None], + mock_evolution_client_factory: Generator[AsyncMock], hvac_mode, evolution_mode, ) -> None: @@ -203,7 +203,7 @@ async def test_set_hvac_mode( async def test_read_hvac_action_heat_cool( hass: HomeAssistant, mock_evolution_entry: MockConfigEntry, - mock_evolution_client_factory: Generator[AsyncMock, None, None], + mock_evolution_client_factory: Generator[AsyncMock], freezer: FrozenDateTimeFactory, curr_temp: int, expected_action: HVACAction, @@ -236,7 +236,7 @@ async def test_read_hvac_action_heat_cool( async def test_read_hvac_action( hass: HomeAssistant, mock_evolution_entry: MockConfigEntry, - mock_evolution_client_factory: Generator[AsyncMock, None, None], + mock_evolution_client_factory: Generator[AsyncMock], freezer: FrozenDateTimeFactory, mode: str, active: bool, diff --git a/tests/components/elevenlabs/conftest.py b/tests/components/elevenlabs/conftest.py index 13eb022243f..c4d9a87b5ad 100644 --- a/tests/components/elevenlabs/conftest.py +++ b/tests/components/elevenlabs/conftest.py @@ -16,7 +16,7 @@ from tests.common import MockConfigEntry @pytest.fixture -def mock_setup_entry() -> Generator[AsyncMock, None, None]: +def mock_setup_entry() -> Generator[AsyncMock]: """Override async_setup_entry.""" with patch( "homeassistant.components.elevenlabs.async_setup_entry", return_value=True @@ -25,7 +25,7 @@ def mock_setup_entry() -> Generator[AsyncMock, None, None]: @pytest.fixture -def mock_async_client() -> Generator[AsyncMock, None, None]: +def mock_async_client() -> Generator[AsyncMock]: """Override async ElevenLabs client.""" client_mock = AsyncMock() client_mock.voices.get_all.return_value = GetVoicesResponse(voices=MOCK_VOICES) @@ -37,7 +37,7 @@ def mock_async_client() -> Generator[AsyncMock, None, None]: @pytest.fixture -def mock_async_client_fail() -> Generator[AsyncMock, None, None]: +def mock_async_client_fail() -> Generator[AsyncMock]: """Override async ElevenLabs client.""" with patch( "homeassistant.components.elevenlabs.config_flow.AsyncElevenLabs", diff --git a/tests/components/iotty/conftest.py b/tests/components/iotty/conftest.py index 7961a4ce3a1..9f858879cb9 100644 --- a/tests/components/iotty/conftest.py +++ b/tests/components/iotty/conftest.py @@ -65,7 +65,7 @@ def aiohttp_client_session() -> None: @pytest.fixture -def mock_aioclient() -> Generator[AiohttpClientMocker, None, None]: +def mock_aioclient() -> Generator[AiohttpClientMocker]: """Fixture to mock aioclient calls.""" with mock_aiohttp_client() as mock_session: yield mock_session @@ -96,7 +96,7 @@ def mock_config_entry(hass: HomeAssistant) -> MockConfigEntry: @pytest.fixture -def mock_config_entries_async_forward_entry_setup() -> Generator[AsyncMock, None, None]: +def mock_config_entries_async_forward_entry_setup() -> Generator[AsyncMock]: """Mock async_forward_entry_setup.""" with patch( "homeassistant.config_entries.ConfigEntries.async_forward_entry_setups" @@ -105,7 +105,7 @@ def mock_config_entries_async_forward_entry_setup() -> Generator[AsyncMock, None @pytest.fixture -def mock_setup_entry() -> Generator[AsyncMock, None, None]: +def mock_setup_entry() -> Generator[AsyncMock]: """Mock setting up a config entry.""" with patch( "homeassistant.components.iotty.async_setup_entry", return_value=True @@ -114,7 +114,7 @@ def mock_setup_entry() -> Generator[AsyncMock, None, None]: @pytest.fixture -def mock_iotty() -> Generator[None, MagicMock, None]: +def mock_iotty() -> Generator[MagicMock]: """Mock IottyProxy.""" with patch( "homeassistant.components.iotty.api.IottyProxy", autospec=True @@ -123,7 +123,7 @@ def mock_iotty() -> Generator[None, MagicMock, None]: @pytest.fixture -def mock_coordinator() -> Generator[None, MagicMock, None]: +def mock_coordinator() -> Generator[MagicMock]: """Mock IottyDataUpdateCoordinator.""" with patch( "homeassistant.components.iotty.coordinator.IottyDataUpdateCoordinator", @@ -133,7 +133,7 @@ def mock_coordinator() -> Generator[None, MagicMock, None]: @pytest.fixture -def mock_get_devices_nodevices() -> Generator[AsyncMock, None, None]: +def mock_get_devices_nodevices() -> Generator[AsyncMock]: """Mock for get_devices, returning two objects.""" with patch("iottycloud.cloudapi.CloudApi.get_devices") as mock_fn: @@ -141,7 +141,7 @@ def mock_get_devices_nodevices() -> Generator[AsyncMock, None, None]: @pytest.fixture -def mock_get_devices_twolightswitches() -> Generator[AsyncMock, None, None]: +def mock_get_devices_twolightswitches() -> Generator[AsyncMock]: """Mock for get_devices, returning two objects.""" with patch( @@ -151,7 +151,7 @@ def mock_get_devices_twolightswitches() -> Generator[AsyncMock, None, None]: @pytest.fixture -def mock_command_fn() -> Generator[AsyncMock, None, None]: +def mock_command_fn() -> Generator[AsyncMock]: """Mock for command.""" with patch("iottycloud.cloudapi.CloudApi.command", return_value=None) as mock_fn: @@ -159,7 +159,7 @@ def mock_command_fn() -> Generator[AsyncMock, None, None]: @pytest.fixture -def mock_get_status_filled_off() -> Generator[AsyncMock, None, None]: +def mock_get_status_filled_off() -> Generator[AsyncMock]: """Mock setting up a get_status.""" retval = {RESULT: {STATUS: STATUS_OFF}} @@ -170,7 +170,7 @@ def mock_get_status_filled_off() -> Generator[AsyncMock, None, None]: @pytest.fixture -def mock_get_status_filled() -> Generator[AsyncMock, None, None]: +def mock_get_status_filled() -> Generator[AsyncMock]: """Mock setting up a get_status.""" retval = {RESULT: {STATUS: STATUS_ON}} diff --git a/tests/components/iron_os/conftest.py b/tests/components/iron_os/conftest.py index b6983074441..f489d7b7bb5 100644 --- a/tests/components/iron_os/conftest.py +++ b/tests/components/iron_os/conftest.py @@ -108,7 +108,7 @@ def mock_ble_device() -> Generator[MagicMock]: @pytest.fixture -def mock_pynecil() -> Generator[AsyncMock, None, None]: +def mock_pynecil() -> Generator[AsyncMock]: """Mock Pynecil library.""" with patch( "homeassistant.components.iron_os.Pynecil", autospec=True diff --git a/tests/components/iron_os/test_number.py b/tests/components/iron_os/test_number.py index c091040668c..781492987ee 100644 --- a/tests/components/iron_os/test_number.py +++ b/tests/components/iron_os/test_number.py @@ -22,7 +22,7 @@ from tests.common import MockConfigEntry, snapshot_platform @pytest.fixture(autouse=True) -async def sensor_only() -> AsyncGenerator[None, None]: +async def sensor_only() -> AsyncGenerator[None]: """Enable only the number platform.""" with patch( "homeassistant.components.iron_os.PLATFORMS", diff --git a/tests/components/iron_os/test_sensor.py b/tests/components/iron_os/test_sensor.py index 0c35193e400..2f79487a7fd 100644 --- a/tests/components/iron_os/test_sensor.py +++ b/tests/components/iron_os/test_sensor.py @@ -18,7 +18,7 @@ from tests.common import MockConfigEntry, async_fire_time_changed, snapshot_plat @pytest.fixture(autouse=True) -async def sensor_only() -> AsyncGenerator[None, None]: +async def sensor_only() -> AsyncGenerator[None]: """Enable only the sensor platform.""" with patch( "homeassistant.components.iron_os.PLATFORMS",