Add tests for Tractive integration (#118470)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
This commit is contained in:
parent
fc5d58effd
commit
cf51179009
18 changed files with 1686 additions and 18 deletions
|
@ -1,12 +1,12 @@
|
|||
"""Test the Tractive diagnostics."""
|
||||
|
||||
from unittest.mock import AsyncMock, patch
|
||||
from unittest.mock import AsyncMock
|
||||
|
||||
from syrupy import SnapshotAssertion
|
||||
|
||||
from homeassistant.components.tractive.const import DOMAIN
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from . import init_integration
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
||||
|
@ -21,9 +21,8 @@ async def test_entry_diagnostics(
|
|||
mock_config_entry: MockConfigEntry,
|
||||
) -> None:
|
||||
"""Test config entry diagnostics."""
|
||||
mock_config_entry.add_to_hass(hass)
|
||||
with patch("homeassistant.components.tractive.PLATFORMS", []):
|
||||
assert await async_setup_component(hass, DOMAIN, {})
|
||||
await init_integration(hass, mock_config_entry)
|
||||
|
||||
result = await get_diagnostics_for_config_entry(
|
||||
hass, hass_client, mock_config_entry
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue