Add missing mock in notion tests (#88951)
This commit is contained in:
parent
853bd52a22
commit
1fa3f32474
2 changed files with 14 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
"""Define fixtures for Notion tests."""
|
||||
from collections.abc import Generator
|
||||
import json
|
||||
from unittest.mock import AsyncMock, Mock, patch
|
||||
|
||||
|
@ -13,6 +14,15 @@ TEST_USERNAME = "user@host.com"
|
|||
TEST_PASSWORD = "password123"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
|
||||
"""Override async_setup_entry."""
|
||||
with patch(
|
||||
"homeassistant.components.notion.async_setup_entry", return_value=True
|
||||
) as mock_setup_entry:
|
||||
yield mock_setup_entry
|
||||
|
||||
|
||||
@pytest.fixture(name="client")
|
||||
def client_fixture(data_bridge, data_sensor, data_task):
|
||||
"""Define a fixture for an aionotion client."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue