Use root import for media_player and media_source in tests (#125829)

pull/125666/head
epenet 2024-09-12 14:55:29 +02:00 committed by GitHub
parent 4e1b865775
commit 1a478bd78a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 14 additions and 12 deletions

View File

@ -15,8 +15,8 @@ import pytest
from homeassistant.components import media_source, ssdp
from homeassistant.components.dlna_dms.const import DOMAIN
from homeassistant.components.dlna_dms.dms import get_domain_data
from homeassistant.components.media_player.errors import BrowseError
from homeassistant.components.media_source.error import Unresolvable
from homeassistant.components.media_player import BrowseError
from homeassistant.components.media_source import Unresolvable
from homeassistant.core import HomeAssistant
from .conftest import (

View File

@ -13,9 +13,8 @@ import pytest
from homeassistant.components import media_source, ssdp
from homeassistant.components.dlna_dms.const import DLNA_SORT_CRITERIA, DOMAIN
from homeassistant.components.dlna_dms.dms import DidlPlayMedia
from homeassistant.components.media_player.errors import BrowseError
from homeassistant.components.media_source.error import Unresolvable
from homeassistant.components.media_source.models import BrowseMediaSource
from homeassistant.components.media_player import BrowseError
from homeassistant.components.media_source import BrowseMediaSource, Unresolvable
from homeassistant.core import HomeAssistant
from .conftest import (

View File

@ -6,7 +6,7 @@ import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.jellyfin.const import DOMAIN
from homeassistant.components.media_player.errors import BrowseError
from homeassistant.components.media_player import BrowseError
from homeassistant.components.media_source import (
DOMAIN as MEDIA_SOURCE_DOMAIN,
URI_SCHEME,

View File

@ -17,7 +17,7 @@ from google_nest_sdm.event import EventMessage
import numpy as np
import pytest
from homeassistant.components.media_player.errors import BrowseError
from homeassistant.components.media_player import BrowseError
from homeassistant.components.media_source import (
URI_SCHEME,
Unresolvable,

View File

@ -10,10 +10,10 @@ from reolink_aio.exceptions import ReolinkError
from homeassistant.components.media_source import (
DOMAIN as MEDIA_SOURCE_DOMAIN,
URI_SCHEME,
Unresolvable,
async_browse_media,
async_resolve_media,
)
from homeassistant.components.media_source.error import Unresolvable
from homeassistant.components.reolink.config_flow import DEFAULT_PROTOCOL
from homeassistant.components.reolink.const import CONF_USE_HTTPS, DOMAIN
from homeassistant.components.stream import DOMAIN as MEDIA_STREAM_DOMAIN

View File

@ -4,7 +4,7 @@ import pytest
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import paths
from homeassistant.components.media_player.errors import BrowseError
from homeassistant.components.media_player import BrowseError
from homeassistant.components.media_source import (
DOMAIN as MEDIA_SOURCE_DOMAIN,
URI_SCHEME,

View File

@ -6,7 +6,7 @@ from unittest.mock import MagicMock
import pytest
from homeassistant.components import media_source
from homeassistant.components.media_player.errors import BrowseError
from homeassistant.components.media_player import BrowseError
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component

View File

@ -8,8 +8,11 @@ from voluptuous.error import MultipleInvalid
from homeassistant import config as hass_config
from homeassistant.components import input_number, input_select, media_player, switch
from homeassistant.components.media_player import MediaClass, MediaPlayerEntityFeature
from homeassistant.components.media_player.browse_media import BrowseMedia
from homeassistant.components.media_player import (
BrowseMedia,
MediaClass,
MediaPlayerEntityFeature,
)
import homeassistant.components.universal.media_player as universal
from homeassistant.const import (
SERVICE_RELOAD,