* chore(sunweg): minor requested changes * test(sunweg): use of fixtures * feat(sunweg): provide bad auth result on expired authentication * chore(sunweg): bump version * chore(sunweg): removed reauth * chore(sunweg): removed features out of scope * chore(sunweg): fixtures moved to conftest.py * chore(sunweg): devicetype moved to const * chore(sunweg): conftest comment Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
21 lines
538 B
Python
21 lines
538 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,
|
|
data={
|
|
CONF_USERNAME: "user@email.com",
|
|
CONF_PASSWORD: "password",
|
|
CONF_PLANT_ID: 0,
|
|
CONF_NAME: "Name",
|
|
},
|
|
)
|