Michael ea04269c49
Improve test coverage for nextcloud (#123148)
* 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
2024-08-27 19:48:39 +02:00

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