diff options
Diffstat (limited to 'pkgs/servers/home-assistant/patches')
-rw-r--r-- | pkgs/servers/home-assistant/patches/tests-ignore-OSErrors-in-hass-fixture.patch | 27 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/patches/tests-mock-source-ip.patch | 4 |
2 files changed, 2 insertions, 29 deletions
diff --git a/pkgs/servers/home-assistant/patches/tests-ignore-OSErrors-in-hass-fixture.patch b/pkgs/servers/home-assistant/patches/tests-ignore-OSErrors-in-hass-fixture.patch deleted file mode 100644 index add0ea1d5521f..0000000000000 --- a/pkgs/servers/home-assistant/patches/tests-ignore-OSErrors-in-hass-fixture.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 3e3f5c37252a33ea1e71c39f2ca0f13940c261ad Mon Sep 17 00:00:00 2001 -From: Martin Weinelt <hexa@darmstadt.ccc.de> -Date: Sat, 17 Jul 2021 16:11:23 +0200 -Subject: [PATCH] tests: ignore OSErrors in hass fixture - -The nix sandbox will cause OSErrors due to limitations imposed on -network interaction. This change makes it so we forgive these cases. ---- - tests/conftest.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tests/conftest.py b/tests/conftest.py -index 1f5ffc80d0..b284727a0f 100644 ---- a/tests/conftest.py -+++ b/tests/conftest.py -@@ -168,6 +168,8 @@ def hass(loop, load_registries, hass_storage, request): - continue - if isinstance(ex, ServiceNotFound): - continue -+ if isinstance(ex, OSError): -+ continue - raise ex - - --- -2.32.0 - diff --git a/pkgs/servers/home-assistant/patches/tests-mock-source-ip.patch b/pkgs/servers/home-assistant/patches/tests-mock-source-ip.patch index 4094d08ee7ff8..6812ee1915bb0 100644 --- a/pkgs/servers/home-assistant/patches/tests-mock-source-ip.patch +++ b/pkgs/servers/home-assistant/patches/tests-mock-source-ip.patch @@ -1,8 +1,8 @@ diff --git a/homeassistant/components/network/__init__.py b/homeassistant/components/network/__init__.py -index 7cc864727d..69333a5454 100644 +index b3ef88e7ab..b7a8471e1a 100644 --- a/homeassistant/components/network/__init__.py +++ b/homeassistant/components/network/__init__.py -@@ -26,7 +26,7 @@ async def async_get_source_ip( +@@ -30,7 +30,7 @@ async def async_get_source_ip( ) -> str: """Get the source ip for a target ip.""" adapters = await async_get_adapters(hass) |