Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 committed Jun 27, 2024
1 parent fc913b6 commit 64b7b57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 64b7b57

Please sign in to comment.