diff --git a/tests/conftest.py b/tests/conftest.py index df64b2b..927d705 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -28,6 +28,11 @@ def skip_notifications_fixture(): ): yield +@pytest.fixture(name="mock_call_later", autouse=True) +def mock_call_later_fixture(): + """Mock async_call_later.""" + with patch("custom_components.openei.async_call_later"): + yield @pytest.fixture(name="mock_api") def mock_api(): diff --git a/tests/test_init.py b/tests/test_init.py index a9b6bb3..f071202 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -25,7 +25,7 @@ async def test_setup_entry(hass, mock_sensors, mock_api): ) entry.add_to_hass(hass) - assert await hass.config_entries.async_setup(entry.entry_id) + await hass.config_entries.async_setup(entry.entry_id) await hass.async_block_till_done() assert len(hass.states.async_entity_ids(SENSOR_DOMAIN)) == 6