mirror of
https://github.com/elisspace/core.git
synced 2026-09-29 22:09:55 +00:00
Bump PySwitchbee to 1.8.0 (#92348)
* fix * fixes * bump pyswitchbee * bump pyswitchbee * bump pyswitchbee * fix * bump pyswitchbee * Apply suggestions from code review --------- Co-authored-by: Jafar Atili <jafar.atili@axonius.com> Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
co-authored by
Jafar Atili
Erik Montnemery
parent
a310b5c1c3
commit
7bc9e1ae9f
@@ -2,6 +2,8 @@
|
||||
import json
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components.switchbee.config_flow import SwitchBeeError
|
||||
from homeassistant.components.switchbee.const import DOMAIN
|
||||
@@ -14,10 +16,15 @@ from . import MOCK_FAILED_TO_LOGIN_MSG, MOCK_INVALID_TOKEN_MGS
|
||||
from tests.common import MockConfigEntry, load_fixture
|
||||
|
||||
|
||||
async def test_form(hass: HomeAssistant) -> None:
|
||||
@pytest.mark.parametrize("test_cucode_in_coordinator_data", [False, True])
|
||||
async def test_form(hass: HomeAssistant, test_cucode_in_coordinator_data) -> None:
|
||||
"""Test we get the form."""
|
||||
|
||||
coordinator_data = json.loads(load_fixture("switchbee.json", "switchbee"))
|
||||
|
||||
if test_cucode_in_coordinator_data:
|
||||
coordinator_data["data"]["cuCode"] = "300F123456"
|
||||
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user