hass-core/tests/components/netatmo/test_api.py
Tobias Sauerwein 7d196abc4a
Add tests for Netatmo oauth2 api (#46375)
* Add Netatmo tests for api

* Update tests/components/netatmo/test_api.py

* Update .coveragerc

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-03-18 14:55:39 +01:00

14 lines
485 B
Python

"""The tests for the Netatmo oauth2 api."""
from unittest.mock import patch
from homeassistant.components.netatmo import api
async def test_api(hass, config_entry):
"""Test auth instantiation."""
with patch(
"homeassistant.helpers.config_entry_oauth2_flow.async_get_config_entry_implementation",
) as fake_implementation:
auth = api.ConfigEntryNetatmoAuth(hass, config_entry, fake_implementation)
assert isinstance(auth, api.ConfigEntryNetatmoAuth)