fix: some minor fixes
Some checks failed
Tests / test (3.13) (push) Failing after 26s
Tests / lint (push) Failing after 16s
Tests / hacs (push) Failing after 30s

Signed-off-by: Rafal Zielinski <sq4ind@gmail.com>
This commit is contained in:
2025-10-02 16:09:10 +01:00
parent bd6a73fa15
commit e23d60d895
10 changed files with 185 additions and 22 deletions

View File

@@ -13,6 +13,7 @@ from custom_components.adguard_control_hub.config_flow import (
from custom_components.adguard_control_hub.const import CONF_SSL, CONF_VERIFY_SSL, DOMAIN
@pytest.mark.asyncio
async def test_form(hass: HomeAssistant) -> None:
"""Test we get the form."""
result = await hass.config_entries.flow.async_init(
@@ -22,6 +23,7 @@ async def test_form(hass: HomeAssistant) -> None:
assert result["errors"] is None
@pytest.mark.asyncio
async def test_form_valid_connection(hass: HomeAssistant, mock_adguard_api) -> None:
"""Test we get the form with valid connection."""
with patch(
@@ -58,6 +60,7 @@ async def test_form_valid_connection(hass: HomeAssistant, mock_adguard_api) -> N
}
@pytest.mark.asyncio
async def test_form_cannot_connect(hass: HomeAssistant) -> None:
"""Test we handle cannot connect error."""
with patch(
@@ -80,6 +83,7 @@ async def test_form_cannot_connect(hass: HomeAssistant) -> None:
assert result2["errors"] == {"base": "cannot_connect"}
@pytest.mark.asyncio
async def test_form_invalid_auth(hass: HomeAssistant) -> None:
"""Test we handle invalid auth error."""
with patch(