mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 09:17:53 +00:00
Add missing mock in amber config flow tests (#89358)
This commit is contained in:
parent
f4572a2e1c
commit
b61ad43144
14
tests/components/amberelectric/conftest.py
Normal file
14
tests/components/amberelectric/conftest.py
Normal file
@ -0,0 +1,14 @@
|
||||
"""Provide common Amber fixtures."""
|
||||
from collections.abc import Generator
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
|
||||
"""Override async_setup_entry."""
|
||||
with patch(
|
||||
"homeassistant.components.amberelectric.async_setup_entry", return_value=True
|
||||
) as mock_setup_entry:
|
||||
yield mock_setup_entry
|
@ -20,6 +20,8 @@ from homeassistant.core import HomeAssistant
|
||||
|
||||
API_KEY = "psk_123456789"
|
||||
|
||||
pytestmark = pytest.mark.usefixtures("mock_setup_entry")
|
||||
|
||||
|
||||
@pytest.fixture(name="invalid_key_api")
|
||||
def mock_invalid_key_api() -> Generator:
|
||||
|
Loading…
x
Reference in New Issue
Block a user