Add return type hints in tests (k-z) (#118942)
This commit is contained in:
parent
b5b7c9bcd5
commit
c7cc465e5c
26 changed files with 79 additions and 76 deletions
|
@ -42,7 +42,7 @@ async def test_webhook_accepts_valid_message(
|
|||
|
||||
async def test_setup_webhook_in_bridge(
|
||||
hass: HomeAssistant, config_entry: MockConfigEntry, lock: loqed.Lock
|
||||
):
|
||||
) -> None:
|
||||
"""Test webhook setup in loqed bridge."""
|
||||
config: dict[str, Any] = {DOMAIN: {}}
|
||||
config_entry.add_to_hass(hass)
|
||||
|
@ -65,7 +65,7 @@ async def test_setup_webhook_in_bridge(
|
|||
|
||||
async def test_cannot_connect_to_bridge_will_retry(
|
||||
hass: HomeAssistant, config_entry: MockConfigEntry, lock: loqed.Lock
|
||||
):
|
||||
) -> None:
|
||||
"""Test webhook setup in loqed bridge."""
|
||||
config: dict[str, Any] = {DOMAIN: {}}
|
||||
config_entry.add_to_hass(hass)
|
||||
|
@ -81,7 +81,7 @@ async def test_cannot_connect_to_bridge_will_retry(
|
|||
|
||||
async def test_setup_cloudhook_in_bridge(
|
||||
hass: HomeAssistant, config_entry: MockConfigEntry, lock: loqed.Lock
|
||||
):
|
||||
) -> None:
|
||||
"""Test webhook setup in loqed bridge."""
|
||||
config: dict[str, Any] = {DOMAIN: {}}
|
||||
config_entry.add_to_hass(hass)
|
||||
|
@ -112,7 +112,7 @@ async def test_setup_cloudhook_in_bridge(
|
|||
|
||||
async def test_setup_cloudhook_from_entry_in_bridge(
|
||||
hass: HomeAssistant, cloud_config_entry: MockConfigEntry, lock: loqed.Lock
|
||||
):
|
||||
) -> None:
|
||||
"""Test webhook setup in loqed bridge."""
|
||||
webhooks_fixture = json.loads(load_fixture("loqed/get_all_webhooks.json"))
|
||||
|
||||
|
@ -143,7 +143,9 @@ async def test_setup_cloudhook_from_entry_in_bridge(
|
|||
lock.registerWebhook.assert_called_with(f"{get_url(hass)}/api/webhook/Webhook_id")
|
||||
|
||||
|
||||
async def test_unload_entry(hass, integration: MockConfigEntry, lock: loqed.Lock):
|
||||
async def test_unload_entry(
|
||||
hass, integration: MockConfigEntry, lock: loqed.Lock
|
||||
) -> None:
|
||||
"""Test successful unload of entry."""
|
||||
|
||||
assert await hass.config_entries.async_unload(integration.entry_id)
|
||||
|
@ -154,7 +156,9 @@ async def test_unload_entry(hass, integration: MockConfigEntry, lock: loqed.Lock
|
|||
assert not hass.data.get(DOMAIN)
|
||||
|
||||
|
||||
async def test_unload_entry_fails(hass, integration: MockConfigEntry, lock: loqed.Lock):
|
||||
async def test_unload_entry_fails(
|
||||
hass, integration: MockConfigEntry, lock: loqed.Lock
|
||||
) -> None:
|
||||
"""Test unsuccessful unload of entry."""
|
||||
lock.deleteWebhook = AsyncMock(side_effect=Exception)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue