From f1a70189acc4e01ac4e91b23782825f978f14579 Mon Sep 17 00:00:00 2001 From: elmurato <1382097+elmurato@users.noreply.github.com> Date: Tue, 19 Sep 2023 22:14:21 +0200 Subject: [PATCH] Clean-up Minecraft Server tests (#100615) Remove patching of getmac, fix typo --- tests/components/minecraft_server/test_config_flow.py | 4 ++-- tests/components/minecraft_server/test_init.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/components/minecraft_server/test_config_flow.py b/tests/components/minecraft_server/test_config_flow.py index c4d8c72e32d..463a78b4680 100644 --- a/tests/components/minecraft_server/test_config_flow.py +++ b/tests/components/minecraft_server/test_config_flow.py @@ -149,7 +149,7 @@ async def test_connection_succeeded_with_host(hass: HomeAssistant) -> None: async def test_connection_succeeded_with_ip4(hass: HomeAssistant) -> None: """Test config entry in case of a successful connection with an IPv4 address.""" - with patch("getmac.get_mac_address", return_value="01:23:45:67:89:ab"), patch( + with patch( "aiodns.DNSResolver.query", side_effect=aiodns.error.DNSError, ), patch( @@ -168,7 +168,7 @@ async def test_connection_succeeded_with_ip4(hass: HomeAssistant) -> None: async def test_connection_succeeded_with_ip6(hass: HomeAssistant) -> None: """Test config entry in case of a successful connection with an IPv6 address.""" - with patch("getmac.get_mac_address", return_value="01:23:45:67:89:ab"), patch( + with patch( "aiodns.DNSResolver.query", side_effect=aiodns.error.DNSError, ), patch( diff --git a/tests/components/minecraft_server/test_init.py b/tests/components/minecraft_server/test_init.py index 5bdce5ed9b7..77b6901a0a2 100644 --- a/tests/components/minecraft_server/test_init.py +++ b/tests/components/minecraft_server/test_init.py @@ -33,7 +33,7 @@ BINARY_SENSOR_KEYS = {"v1": "Status", "v2": "status"} async def test_entry_migration_v1_to_v2(hass: HomeAssistant) -> None: - """Test entry migratiion from version 1 to 2.""" + """Test entry migration from version 1 to 2.""" # Create mock config entry. config_entry_v1 = MockConfigEntry(