Added file path validity checks to file sensor (#12505)
* Added file validity checks to file sensor * Patched out 'is_allowed_path' for file sensor tests
This commit is contained in:
1 parent
8617177ff1
commit
3e5462ebff
2 files changed
+8
-3
No files matched your search
@@ -18,6 +18,8 @@ class TestFileSensor(unittest.TestCase):
|
||||
def setup_method(self, method):
|
||||
"""Set up things to be run when tests are started."""
|
||||
self.hass = get_test_home_assistant()
|
||||
# Patch out 'is_allowed_path' as the mock files aren't allowed
|
||||
self.hass.config.is_allowed_path = Mock(return_value=True)
|
||||
mock_registry(self.hass)
|
||||
|
||||
def teardown_method(self, method):
|
||||
|
||||
Reference in new issue
Block a user