mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Don't try to create /test dir in camera tests (#39914)
ERROR:homeassistant.components.camera: Can't write image to file: [Errno 13] Permission denied: '/test'
This commit is contained in:
parent
aad6a24f28
commit
ad1a71ebc3
@ -14,7 +14,7 @@ from homeassistant.const import ATTR_ENTITY_ID, EVENT_HOMEASSISTANT_START
|
|||||||
from homeassistant.exceptions import HomeAssistantError
|
from homeassistant.exceptions import HomeAssistantError
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
from tests.async_mock import PropertyMock, mock_open, patch
|
from tests.async_mock import Mock, PropertyMock, mock_open, patch
|
||||||
from tests.components.camera import common
|
from tests.components.camera import common
|
||||||
|
|
||||||
|
|
||||||
@ -114,8 +114,9 @@ async def test_snapshot_service(hass, mock_camera):
|
|||||||
"""Test snapshot service."""
|
"""Test snapshot service."""
|
||||||
mopen = mock_open()
|
mopen = mock_open()
|
||||||
|
|
||||||
with patch(
|
with patch("homeassistant.components.camera.open", mopen, create=True), patch(
|
||||||
"homeassistant.components.camera.open", mopen, create=True
|
"homeassistant.components.camera.os.path.exists",
|
||||||
|
Mock(spec="os.path.exists", return_value=True),
|
||||||
), patch.object(hass.config, "is_allowed_path", return_value=True):
|
), patch.object(hass.config, "is_allowed_path", return_value=True):
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
camera.DOMAIN,
|
camera.DOMAIN,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user