Move media_source to after_deps (#67195)

This commit is contained in:
Paulus Schoutsen 2022-02-24 14:54:46 -08:00 committed by GitHub
parent d64777359d
commit 2a8dc38d2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 14 deletions

View File

@ -4,7 +4,8 @@
"config_flow": true, "config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/dlna_dms", "documentation": "https://www.home-assistant.io/integrations/dlna_dms",
"requirements": ["async-upnp-client==0.23.5"], "requirements": ["async-upnp-client==0.23.5"],
"dependencies": ["media_source", "ssdp"], "dependencies": ["ssdp"],
"after_dependencies": ["media_source"],
"ssdp": [ "ssdp": [
{ {
"deviceType": "urn:schemas-upnp-org:device:MediaServer:1", "deviceType": "urn:schemas-upnp-org:device:MediaServer:1",
@ -26,4 +27,4 @@
"codeowners": ["@chishm"], "codeowners": ["@chishm"],
"iot_class": "local_polling", "iot_class": "local_polling",
"quality_scale": "platinum" "quality_scale": "platinum"
} }

View File

@ -3,17 +3,10 @@
"name": "motionEye", "name": "motionEye",
"documentation": "https://www.home-assistant.io/integrations/motioneye", "documentation": "https://www.home-assistant.io/integrations/motioneye",
"config_flow": true, "config_flow": true,
"dependencies": [ "dependencies": ["http", "webhook"],
"http", "after_dependencies": ["media_source"],
"media_source", "requirements": ["motioneye-client==0.3.12"],
"webhook" "codeowners": ["@dermotduffy"],
],
"requirements": [
"motioneye-client==0.3.12"
],
"codeowners": [
"@dermotduffy"
],
"iot_class": "local_polling", "iot_class": "local_polling",
"loggers": ["motioneye_client"] "loggers": ["motioneye_client"]
} }

View File

@ -2,7 +2,8 @@
"domain": "nest", "domain": "nest",
"name": "Nest", "name": "Nest",
"config_flow": true, "config_flow": true,
"dependencies": ["ffmpeg", "http", "media_source"], "dependencies": ["ffmpeg", "http"],
"after_dependencies": ["media_source"],
"documentation": "https://www.home-assistant.io/integrations/nest", "documentation": "https://www.home-assistant.io/integrations/nest",
"requirements": ["python-nest==4.2.0", "google-nest-sdm==1.7.1"], "requirements": ["python-nest==4.2.0", "google-nest-sdm==1.7.1"],
"codeowners": ["@allenporter"], "codeowners": ["@allenporter"],

View File

@ -12,6 +12,7 @@ from homeassistant.components.media_source.models import PlayMedia
from homeassistant.components.motioneye.const import DOMAIN from homeassistant.components.motioneye.const import DOMAIN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr from homeassistant.helpers import device_registry as dr
from homeassistant.setup import async_setup_component
from . import ( from . import (
TEST_CAMERA_DEVICE_IDENTIFIER, TEST_CAMERA_DEVICE_IDENTIFIER,
@ -67,6 +68,12 @@ TEST_IMAGES = {
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
@pytest.fixture(autouse=True)
async def setup_media_source(hass) -> None:
"""Set up media source."""
assert await async_setup_component(hass, "media_source", {})
async def test_async_browse_media_success(hass: HomeAssistant) -> None: async def test_async_browse_media_success(hass: HomeAssistant) -> None:
"""Test successful browse media.""" """Test successful browse media."""

View File

@ -90,6 +90,12 @@ def frame_image_data(frame_i, total_frames):
return img return img
@pytest.fixture(autouse=True)
async def setup_media_source(hass) -> None:
"""Set up media source."""
assert await async_setup_component(hass, "media_source", {})
@pytest.fixture @pytest.fixture
def mp4() -> io.BytesIO: def mp4() -> io.BytesIO:
"""Generate test mp4 clip.""" """Generate test mp4 clip."""