mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Clean-up Minecraft Server tests (#100615)
Remove patching of getmac, fix typo
This commit is contained in:
parent
c099ec19f2
commit
f1a70189ac
@ -149,7 +149,7 @@ async def test_connection_succeeded_with_host(hass: HomeAssistant) -> None:
|
|||||||
|
|
||||||
async def test_connection_succeeded_with_ip4(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."""
|
"""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",
|
"aiodns.DNSResolver.query",
|
||||||
side_effect=aiodns.error.DNSError,
|
side_effect=aiodns.error.DNSError,
|
||||||
), patch(
|
), 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:
|
async def test_connection_succeeded_with_ip6(hass: HomeAssistant) -> None:
|
||||||
"""Test config entry in case of a successful connection with an IPv6 address."""
|
"""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",
|
"aiodns.DNSResolver.query",
|
||||||
side_effect=aiodns.error.DNSError,
|
side_effect=aiodns.error.DNSError,
|
||||||
), patch(
|
), patch(
|
||||||
|
@ -33,7 +33,7 @@ BINARY_SENSOR_KEYS = {"v1": "Status", "v2": "status"}
|
|||||||
|
|
||||||
|
|
||||||
async def test_entry_migration_v1_to_v2(hass: HomeAssistant) -> None:
|
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.
|
# Create mock config entry.
|
||||||
config_entry_v1 = MockConfigEntry(
|
config_entry_v1 = MockConfigEntry(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user