File: test_const.py

package info (click to toggle)
python-aioshelly 13.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 732 kB
  • sloc: python: 6,867; makefile: 7; sh: 3
file content (20 lines) | stat: -rw-r--r-- 489 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""Tests for const module."""

import pytest

from aioshelly.const import DEVICES, MODEL_NAMES


@pytest.mark.parametrize(
    ("model", "expected_name"),
    [
        ("SHSW-1", "Shelly 1"),
        ("SHSW-21", "Shelly 2"),
        ("SHSW-25", "Shelly 2.5"),
        ("SHSW-44", "Shelly 4Pro"),
    ],
)
def test_model_name(model: str, expected_name: str) -> None:
    """Test model name."""
    assert MODEL_NAMES[model] == expected_name
    assert DEVICES[model].name == expected_name