mirror of
https://github.com/home-assistant/core.git
synced 2025-11-10 03:19:34 +00:00
* Added smarla integration * Apply suggested changes * Bump pysmarlaapi version and reevaluate quality scale * Focus on switch platform * Bump pysmarlaapi version * Change default name of device * Code refactoring * Removed obsolete reload function * Code refactoring and clean up * Bump pysmarlaapi version * Refactoring and changed access token format * Fix tests for smarla config_flow * Update quality_scale * Major rework of tests and refactoring * Bump pysmarlaapi version * Use object equality operator when applicable * Refactoring * Patch both connection objects * Refactor tests * Fix leaking tests * Implemented full test coverage * Bump pysmarlaapi version * Fix tests * Improve tests --------- Co-authored-by: Joostlek <joostlek@outlook.com>
21 lines
463 B
Python
21 lines
463 B
Python
"""Constants for the Smarla integration tests."""
|
|
|
|
import base64
|
|
import json
|
|
|
|
from homeassistant.const import CONF_ACCESS_TOKEN
|
|
|
|
MOCK_ACCESS_TOKEN_JSON = {
|
|
"refreshToken": "test",
|
|
"appIdentifier": "HA-test",
|
|
"serialNumber": "ABCD",
|
|
}
|
|
|
|
MOCK_SERIAL_NUMBER = MOCK_ACCESS_TOKEN_JSON["serialNumber"]
|
|
|
|
MOCK_ACCESS_TOKEN = base64.b64encode(
|
|
json.dumps(MOCK_ACCESS_TOKEN_JSON).encode()
|
|
).decode()
|
|
|
|
MOCK_USER_INPUT = {CONF_ACCESS_TOKEN: MOCK_ACCESS_TOKEN}
|