forked from openviess/PyViCare
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_Vitocal300G.py
74 lines (55 loc) · 2.7 KB
/
test_Vitocal300G.py
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import unittest
from PyViCare.PyViCareHeatPump import HeatPump
from tests.ViCareServiceMock import ViCareServiceMock
class Vitocal300G(unittest.TestCase):
def setUp(self):
self.service = ViCareServiceMock('response/Vitocal300G.json')
self.device = HeatPump(self.service)
def test_getCompressorActive(self):
self.assertEqual(self.device.compressors[0].getActive(), False)
def test_getCompressorHours(self):
self.assertAlmostEqual(
self.device.compressors[0].getHours(), 1762.41)
def test_getCompressorStarts(self):
self.assertAlmostEqual(
self.device.compressors[0].getStarts(), 3012)
def test_getCompressorHoursLoadClass1(self):
self.assertAlmostEqual(
self.device.compressors[0].getHoursLoadClass1(), 30)
def test_getCompressorHoursLoadClass2(self):
self.assertAlmostEqual(
self.device.compressors[0].getHoursLoadClass2(), 703)
def test_getCompressorHoursLoadClass3(self):
self.assertAlmostEqual(
self.device.compressors[0].getHoursLoadClass3(), 878)
def test_getCompressorHoursLoadClass4(self):
self.assertAlmostEqual(
self.device.compressors[0].getHoursLoadClass4(), 117)
def test_getCompressorHoursLoadClass5(self):
self.assertAlmostEqual(
self.device.compressors[0].getHoursLoadClass5(), 20)
def test_getHeatingCurveSlope(self):
self.assertAlmostEqual(
self.device.circuits[0].getHeatingCurveSlope(), 0.8)
def test_getHeatingCurveShift(self):
self.assertAlmostEqual(
self.device.circuits[0].getHeatingCurveShift(), -5)
def test_getReturnTemperature(self):
self.assertAlmostEqual(self.device.getReturnTemperature(), 18.9)
def test_getReturnTemperaturePrimaryCircuit(self):
self.assertAlmostEqual(self.device.getReturnTemperaturePrimaryCircuit(), 18.4)
def test_getSupplyTemperaturePrimaryCircuit(self):
self.assertAlmostEqual(
self.device.getSupplyTemperaturePrimaryCircuit(), 18.2)
def test_getPrograms(self):
expected_programs = ['active', 'comfort', 'eco',
'fixed', 'holiday', 'normal', 'reduced', 'standby']
self.assertListEqual(
self.device.circuits[0].getPrograms(), expected_programs)
def test_getModes(self):
expected_modes = ['dhw', 'dhwAndHeating', 'forcedNormal', 'forcedReduced', 'standby', 'normalStandby']
self.assertListEqual(
self.device.circuits[0].getModes(), expected_modes)
def test_getDomesticHotWaterCirculationPumpActive(self):
self.assertEqual(
self.device.getDomesticHotWaterCirculationPumpActive(), False)