File: test_zone.py

package info (click to toggle)
pytouchlinesl 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 380 kB
  • sloc: python: 758; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 445 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import pytest

test_attrs = [
    ("temperature", 22.1),
    ("target_temperature", 18.0),
    ("humidity", 61.0),
    ("mode", "globalSchedule"),
    ("enabled", True),
    ("relay_on", True),
    ("algorithm", "heating"),
    ("signal_strength", 53),
    ("alarm", None),
]


@pytest.mark.asyncio
@pytest.mark.parametrize("attr,val", test_attrs)
async def test_zone_attributes(attr, val, test_zone):
    assert getattr(test_zone, attr) == val