diff --git a/.coveragerc b/.coveragerc index 8f609ec5b22..92d55e83527 100644 --- a/.coveragerc +++ b/.coveragerc @@ -644,7 +644,6 @@ omit = homeassistant/components/nello/lock.py homeassistant/components/nest/legacy/* homeassistant/components/netatmo/__init__.py - homeassistant/components/netatmo/api.py homeassistant/components/netatmo/camera.py homeassistant/components/netatmo/data_handler.py homeassistant/components/netatmo/helper.py diff --git a/tests/components/netatmo/test_api.py b/tests/components/netatmo/test_api.py new file mode 100644 index 00000000000..76d16d10515 --- /dev/null +++ b/tests/components/netatmo/test_api.py @@ -0,0 +1,14 @@ +"""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)