mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Split reauth tests in plex (#89212)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"""Fixtures for Plex tests."""
|
||||
from unittest.mock import patch
|
||||
from collections.abc import Generator
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -18,6 +19,15 @@ def plex_server_url(entry):
|
||||
return entry.data[PLEX_SERVER_CONFIG][CONF_URL].split(":", 1)[-1]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
|
||||
"""Override async_setup_entry."""
|
||||
with patch(
|
||||
"homeassistant.components.plex.async_setup_entry", return_value=True
|
||||
) as mock_setup_entry:
|
||||
yield mock_setup_entry
|
||||
|
||||
|
||||
@pytest.fixture(name="album", scope="session")
|
||||
def album_fixture():
|
||||
"""Load album payload and return it."""
|
||||
|
||||
Reference in New Issue
Block a user