Fix local_file partial tests (#63023)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-12-30 03:52:23 +01:00 committed by GitHub
parent b9247f3952
commit e3c1a3567e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,9 @@ async def test_loading_file(hass, hass_client):
with mock.patch("os.path.isfile", mock.Mock(return_value=True)), mock.patch(
"os.access", mock.Mock(return_value=True)
), mock.patch(
"homeassistant.components.local_file.camera.mimetypes.guess_type",
mock.Mock(return_value=(None, None)),
):
await async_setup_component(
hass,
@ -138,6 +141,9 @@ async def test_update_file_path(hass):
with mock.patch("os.path.isfile", mock.Mock(return_value=True)), mock.patch(
"os.access", mock.Mock(return_value=True)
), mock.patch(
"homeassistant.components.local_file.camera.mimetypes.guess_type",
mock.Mock(return_value=(None, None)),
):
camera_1 = {"platform": "local_file", "file_path": "mock/path.jpg"}