Make sure Notion saves new refresh token upon startup (#112676)

* Make sure Notion saves new refresh token upon startup

* Code review

* Typing

* Smoother syntax

* Fix tests

* Fix tests for real
This commit is contained in:
Aaron Bach 2024-03-08 20:27:56 -07:00 committed by GitHub
parent 5b2a24b1bb
commit 3405bda835
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 7 deletions

View file

@ -10,8 +10,8 @@ from aionotion.sensor.models import Sensor
from aionotion.user.models import UserPreferences
import pytest
from homeassistant.components.notion import DOMAIN
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.components.notion import CONF_REFRESH_TOKEN, CONF_USER_UUID, DOMAIN
from homeassistant.const import CONF_USERNAME
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry, load_fixture
@ -82,7 +82,8 @@ def config_fixture():
"""Define a config entry data fixture."""
return {
CONF_USERNAME: TEST_USERNAME,
CONF_PASSWORD: TEST_PASSWORD,
CONF_USER_UUID: TEST_USER_UUID,
CONF_REFRESH_TOKEN: TEST_REFRESH_TOKEN,
}