Add missing mock in notion tests (#88951)

This commit is contained in:
epenet 2023-03-01 09:41:55 +01:00 committed by GitHub
parent 853bd52a22
commit 1fa3f32474
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View file

@ -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."""