mirror of
https://github.com/home-assistant/core.git
synced 2025-04-27 10:47:51 +00:00

* add first data driven tests * remove unused mock * test unique_id migration * test errors during setup * test error during data update * test update entity * system_versionis always available * make use of snapshot_platform helper * use parametrize test for coordinator update errors * apply suggestions * don't touch internals on coordinator tests * rework to use async_get_or_create instead of mock_registry
16 lines
409 B
Python
16 lines
409 B
Python
"""Fixtrues for the Nextcloud integration tests."""
|
|
|
|
from collections.abc import Generator
|
|
from unittest.mock import AsyncMock, patch
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture
|
|
def mock_setup_entry() -> Generator[AsyncMock]:
|
|
"""Override async_setup_entry."""
|
|
with patch(
|
|
"homeassistant.components.nextcloud.async_setup_entry", return_value=True
|
|
) as mock_setup_entry:
|
|
yield mock_setup_entry
|