mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-09 02:49:43 +00:00
Migrate to Ruff for lint and format (#4852)
* Migrate to Ruff for lint and format * Fix pylint issues * DBus property sets into normal awaitable methods * Fix tests relying on separate tasks in connect * Fixes from feedback
This commit is contained in:
@@ -204,9 +204,7 @@ async def test_attach_container_failure(coresys: CoreSys):
|
||||
), patch(
|
||||
"supervisor.docker.manager.DockerAPI.images",
|
||||
new=PropertyMock(return_value=image_collection),
|
||||
), patch.object(
|
||||
type(coresys.bus), "fire_event"
|
||||
) as fire_event:
|
||||
), patch.object(type(coresys.bus), "fire_event") as fire_event:
|
||||
await coresys.homeassistant.core.instance.attach(AwesomeVersion("2022.7.3"))
|
||||
assert not [
|
||||
event
|
||||
@@ -228,9 +226,7 @@ async def test_attach_total_failure(coresys: CoreSys):
|
||||
), patch(
|
||||
"supervisor.docker.manager.DockerAPI.images",
|
||||
new=PropertyMock(return_value=image_collection),
|
||||
), pytest.raises(
|
||||
DockerError
|
||||
):
|
||||
), pytest.raises(DockerError):
|
||||
await coresys.homeassistant.core.instance.attach(AwesomeVersion("2022.7.3"))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user