core/tests/components/deluge/__init__.py
Mark Grandi c265c91ef2
Add protocol upload / download sensors to Deluge (#119203)
* Add Protocol Upload/Download for Deluge

* add unit test and fix typo in sensor.py

* remove unneeded import

* rename/unify the translation keys and entries in const.py

* split out const.py items into DelugeSensorType to avoid confusion with DelugeGetSessionStatusKeys

* change DelugeGetSessionStatusKeys to be a regular enum to satisfy mypy
2024-10-02 16:44:56 +02:00

24 lines
565 B
Python

"""Tests for the Deluge integration."""
from homeassistant.components.deluge.const import (
CONF_WEB_PORT,
DEFAULT_RPC_PORT,
DEFAULT_WEB_PORT,
)
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_USERNAME
CONF_DATA = {
CONF_HOST: "1.2.3.4",
CONF_USERNAME: "user",
CONF_PASSWORD: "password",
CONF_PORT: DEFAULT_RPC_PORT,
CONF_WEB_PORT: DEFAULT_WEB_PORT,
}
GET_TORRENT_STATUS_RESPONSE = {
"upload_rate": 3462.0,
"download_rate": 98.5,
"dht_upload_rate": 7818.0,
"dht_download_rate": 2658.0,
}