* use DataUpdateCoordinator for glances add tests to increase coverage fix test_config_flow.py fix codecov/patch remove unused const, minor tweaks remove invalid_auth test as it is not implemented fix type hints * change to async_forward_entry_setups * Use Dataupdatecoordinator for glances * minor fixex * minor fixes * minor fix * remove support_versions const * coe cleanup * address comments * fix sensor native_value * Rename entry to entry_data in `get_api` * Remove whitespace in sensor name
15 lines
420 B
Python
15 lines
420 B
Python
"""Conftest for speedtestdotnet."""
|
|
from unittest.mock import AsyncMock, patch
|
|
|
|
import pytest
|
|
|
|
from . import MOCK_DATA
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def mock_api():
|
|
"""Mock glances api."""
|
|
with patch("homeassistant.components.glances.Glances") as mock_api:
|
|
mock_api.return_value.get_data = AsyncMock(return_value=None)
|
|
mock_api.return_value.data.return_value = MOCK_DATA
|
|
yield mock_api
|