Fix typos in UptimeRobot tests (#143397)

This commit is contained in:
Simone Chemelli 2025-04-21 14:11:51 +02:00 committed by GitHub
parent 8fa48a9781
commit 7ea8827e69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 16 deletions

View File

@ -41,9 +41,7 @@ rules:
log-when-unavailable: done
parallel-updates: done
reauthentication-flow: done
test-coverage:
status: todo
comment: recheck typos
test-coverage: done
# Gold
devices: done

View File

@ -34,8 +34,8 @@ async def test_presentation(hass: HomeAssistant) -> None:
assert entity.attributes["target"] == MOCK_UPTIMEROBOT_MONITOR["url"]
async def test_unaviable_on_update_failure(hass: HomeAssistant) -> None:
"""Test entity unaviable on update failure."""
async def test_unavailable_on_update_failure(hass: HomeAssistant) -> None:
"""Test entity unavailable on update failure."""
await setup_uptimerobot_integration(hass)
entity = hass.states.get(UPTIMEROBOT_BINARY_SENSOR_TEST_ENTITY)

View File

@ -24,8 +24,8 @@ from .common import (
from tests.common import MockConfigEntry
async def test_form(hass: HomeAssistant) -> None:
"""Test we get the form."""
async def test_user(hass: HomeAssistant) -> None:
"""Test user flow."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
@ -56,8 +56,8 @@ async def test_form(hass: HomeAssistant) -> None:
assert len(mock_setup_entry.mock_calls) == 1
async def test_form_read_only(hass: HomeAssistant) -> None:
"""Test we get the form."""
async def test_user_key_read_only(hass: HomeAssistant) -> None:
"""Test user flow with read only key."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
@ -87,8 +87,8 @@ async def test_form_read_only(hass: HomeAssistant) -> None:
(UptimeRobotAuthenticationException, "invalid_api_key"),
],
)
async def test_form_exception_thrown(hass: HomeAssistant, exception, error_key) -> None:
"""Test that we handle exceptions."""
async def test_exception_thrown(hass: HomeAssistant, exception, error_key) -> None:
"""Test user flow throwing exceptions."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
@ -106,10 +106,8 @@ async def test_form_exception_thrown(hass: HomeAssistant, exception, error_key)
assert result2["errors"]["base"] == error_key
async def test_form_api_error(
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
) -> None:
"""Test we handle unexpected error."""
async def test_api_error(hass: HomeAssistant, caplog: pytest.LogCaptureFixture) -> None:
"""Test expected API error is catch."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)

View File

@ -239,7 +239,6 @@ async def test_device_management(
freezer.tick(COORDINATOR_UPDATE_INTERVAL)
async_fire_time_changed(hass)
await hass.async_block_till_done()
await hass.async_block_till_done()
devices = dr.async_entries_for_config_entry(device_registry, mock_entry.entry_id)
assert len(devices) == 1