Add type hints to integration tests (part 2) (#87789)

* Add type hints to integration tests (part 2)

* typo

* Improve analytics

* Improve automation

* Imrpove bluetooth
This commit is contained in:
epenet 2023-02-10 16:05:26 +01:00 committed by GitHub
parent fa7acb4f0d
commit 0cf5e9fb4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 1075 additions and 676 deletions

View file

@ -5,14 +5,15 @@ import pytest
from homeassistant.components import axis
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
async def test_setup_entry(hass, setup_config_entry):
async def test_setup_entry(hass: HomeAssistant, setup_config_entry) -> None:
"""Test successful setup of entry."""
assert setup_config_entry.state == ConfigEntryState.LOADED
async def test_setup_entry_fails(hass, config_entry):
async def test_setup_entry_fails(hass: HomeAssistant, config_entry) -> None:
"""Test successful setup of entry."""
mock_device = Mock()
mock_device.async_setup = AsyncMock(return_value=False)
@ -25,7 +26,7 @@ async def test_setup_entry_fails(hass, config_entry):
assert config_entry.state == ConfigEntryState.SETUP_ERROR
async def test_unload_entry(hass, setup_config_entry):
async def test_unload_entry(hass: HomeAssistant, setup_config_entry) -> None:
"""Test successful unload of entry."""
assert setup_config_entry.state == ConfigEntryState.LOADED
@ -34,7 +35,7 @@ async def test_unload_entry(hass, setup_config_entry):
@pytest.mark.parametrize("config_entry_version", [1])
async def test_migrate_entry(hass, config_entry):
async def test_migrate_entry(hass: HomeAssistant, config_entry) -> None:
"""Test successful migration of entry data."""
assert config_entry.version == 1