Fix uncaught exception in local_file (#34312)

* remove ignore from localfile

* added mock_registry

* since there are no more exceptions, infra to ignore them is redundant
This commit is contained in:
Ziv 2020-04-17 14:10:48 +03:00 committed by GitHub
parent a2b280f342
commit 1259979204
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 23 deletions

View file

@ -41,6 +41,8 @@ async def test_loading_file(hass, hass_client):
async def test_file_not_readable(hass, caplog):
"""Test a warning is shown setup when file is not readable."""
mock_registry(hass)
with mock.patch("os.path.isfile", mock.Mock(return_value=True)), mock.patch(
"os.access", mock.Mock(return_value=False)
):