File: test_Vitodens100W.py

package info (click to toggle)
pyvicare 2.44.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 3,552 kB
  • sloc: python: 4,295; sh: 5; makefile: 2
file content (41 lines) | stat: -rw-r--r-- 1,914 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import unittest

from PyViCare.PyViCareGazBoiler import GazBoiler
from tests.ViCareServiceMock import ViCareServiceMock


class Vitodens100W(unittest.TestCase):
    def setUp(self):
        self.service = ViCareServiceMock('response/Vitodens100W.json')
        self.device = GazBoiler(self.service)

    def test_getActive(self):
        self.assertEqual(self.device.burners[0].getActive(), False)

    def test_getBurnerStarts(self):
        self.assertEqual(self.device.burners[0].getStarts(), 6826)

    def test_getBurnerHours(self):
        self.assertEqual(self.device.burners[0].getHours(), 675)

    def test_getBurnerModulation(self):
        self.assertEqual(self.device.burners[0].getModulation(), 0)

    def test_getGasSummaryConsumptionHeatingCurrentDay(self):
        self.assertEqual(self.device.getGasSummaryConsumptionHeatingCurrentDay(), 11.2)
        self.assertEqual(self.device.getGasSummaryConsumptionHeatingUnit(), "cubicMeter")

    def test_getGasSummaryConsumptionDomesticHotWaterCurrentMonth(self):
        self.assertEqual(self.device.getGasSummaryConsumptionDomesticHotWaterCurrentMonth(), 13.7)
        self.assertEqual(self.device.getGasSummaryConsumptionDomesticHotWaterUnit(), "cubicMeter")

    def test_getPowerSummaryConsumptionHeatingCurrentDay(self):
        self.assertEqual(self.device.getPowerSummaryConsumptionHeatingCurrentDay(), 0.9)
        self.assertEqual(self.device.getPowerSummaryConsumptionHeatingUnit(), "kilowattHour")

    def test_getPowerSummaryConsumptionDomesticHotWaterCurrentYear(self):
        self.assertEqual(self.device.getPowerSummaryConsumptionDomesticHotWaterCurrentYear(), 18)
        self.assertEqual(self.device.getPowerSummaryConsumptionDomesticHotWaterUnit(), "kilowattHour")

    def test_getGasSummaryConsumptionDomesticHotWaterUnit(self):
        self.assertEqual(self.device.getGasSummaryConsumptionDomesticHotWaterUnit(), "cubicMeter")