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:
parent
fa7acb4f0d
commit
0cf5e9fb4a
54 changed files with 1075 additions and 676 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue