1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 20:35:55 +00:00

Use session dbus mocks for all tests (#4198)

* Use session dbus mocks for all tests

* func instead of fn for pylint
This commit is contained in:
Mike Degatano
2023-03-21 02:30:31 -04:00
committed by GitHub
parent c6ddc8e427
commit a6caccd845
157 changed files with 685 additions and 6572 deletions

View File

@@ -24,6 +24,7 @@ class NetworkManager(DBusServiceMock):
interface = "org.freedesktop.NetworkManager"
object_path = "/org/freedesktop/NetworkManager"
version = "1.22.10"
connectivity = 4
@dbus_property(access=PropertyAccess.READ)
def Devices(self) -> "ao":
@@ -145,7 +146,7 @@ class NetworkManager(DBusServiceMock):
@dbus_property(access=PropertyAccess.READ)
def Connectivity(self) -> "u":
"""Get Connectivity."""
return 4
return self.connectivity
@dbus_property(access=PropertyAccess.READ)
def ConnectivityCheckAvailable(self) -> "b":
@@ -300,7 +301,7 @@ class NetworkManager(DBusServiceMock):
@dbus_method()
def CheckConnectivity(self) -> "u":
"""Do CheckConnectivity method."""
return 4
return self.Connectivity
@dbus_method()
def state(self) -> "u":