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

* Add Config Flow for Rova component * Add tests for Rova config flow * Fix data type * Add rova to requirements for tests * Removed seperate function for area check and global variable * Add unique name and id to rova entities * Add support for multiple rova entries * Fix correct error after connection timeout or http error * Revert SENSOR_TYPES update * Add existing rova configuration from yaml as new entity * Add tests for import configuration.yaml flow * Cleanup code * Update valid rova area check in config flow * Changed abort keys and messages * Updated using self.add_suggested_values_to_schema * Update to pass tests * Added missing strings * Update sensor unique_ids * Fix service name formatting * Update tests for Rova entry * Update tests to recover after error * Update test name * Apply suggestions from code review --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
19 lines
433 B
Python
19 lines
433 B
Python
"""Common fixtures for Rova tests."""
|
|
|
|
from unittest.mock import MagicMock, patch
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture
|
|
def mock_rova():
|
|
"""Mock a successful Rova API."""
|
|
api = MagicMock()
|
|
|
|
with patch(
|
|
"homeassistant.components.rova.config_flow.Rova",
|
|
return_value=api,
|
|
) as api, patch("homeassistant.components.rova.Rova", return_value=api):
|
|
api.is_rova_area.return_value = True
|
|
yield api
|