mirror of
https://github.com/home-assistant/core.git
synced 2025-11-16 06:20:07 +00:00
Raise ImportError in python_script (#134792)
This commit is contained in:
@@ -711,4 +711,4 @@ async def test_no_other_imports_allowed(
|
||||
source = "import sys"
|
||||
hass.async_add_executor_job(execute, hass, "test.py", source, {})
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
assert "Error executing script: Not allowed to import sys" in caplog.text
|
||||
assert "ImportError: Not allowed to import sys" in caplog.text
|
||||
|
||||
Reference in New Issue
Block a user