mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-24 12:29:08 +00:00
Add timeout handling to gdbus (#2053)
* Add timeout handling to gdbus * fix bus name * make it silent * fix tests * add more wraper
This commit is contained in:
@@ -44,7 +44,10 @@ def dbus() -> DBus:
|
||||
async def mock_get_properties(_, interface):
|
||||
return load_json_fixture(f"{interface.replace('.', '_')}.json")
|
||||
|
||||
async def mock_send(_, command):
|
||||
async def mock_send(_, command, silent=False):
|
||||
if silent:
|
||||
return ""
|
||||
|
||||
filetype = "xml" if "--xml" in command else "fixture"
|
||||
fixture = f"{command[6].replace('/', '_')[1:]}.{filetype}"
|
||||
return load_fixture(fixture)
|
||||
|
||||
Reference in New Issue
Block a user