hass-core/tests/components/sunweg/common.py
Lucas Mindêllo de Andrade 5fb12c93aa
SunWEG reauth flow ()
* feat(sunweg): reauth flow

* fix(sunweg): autentication as sunweg 2.1.0

* fix: configflowresult

* chore(sunweg): dedupe code

* chore(sunweg): using entry_id instead of unique_id

* test(sunweg): added test launch reauth flow

* chore(sunweg): moved test_reauth_started test

* chore(sunweg): formatting

* chore(sunweg): formating

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-28 13:53:32 +01:00

22 lines
555 B
Python

"""Common functions needed to setup tests for Sun WEG."""
from homeassistant.components.sunweg.const import CONF_PLANT_ID, DOMAIN
from homeassistant.const import CONF_NAME, CONF_PASSWORD, CONF_USERNAME
from tests.common import MockConfigEntry
SUNWEG_USER_INPUT = {
CONF_USERNAME: "username",
CONF_PASSWORD: "password",
}
SUNWEG_MOCK_ENTRY = MockConfigEntry(
domain=DOMAIN,
unique_id=0,
data={
CONF_USERNAME: "user@email.com",
CONF_PASSWORD: "password",
CONF_PLANT_ID: 0,
CONF_NAME: "Name",
},
)