forked from openviess/PyViCare
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial test for Vitodens333F (openviess#141)
* Adding Vitodens 300W data and test * Adding tests for NotSupportedFeatureError, but leaving commented out desired outcome as Viessmann should support these as they used too * Last update for vitodens300W for now - take it or leave it:-) * Merged * Adding description and changes to make it easier to extract test datasets for others * Adding tests for Vitodens333F and renamed response file
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import unittest | ||
from tests.ViCareServiceMock import ViCareServiceMock | ||
from PyViCare.PyViCareGazBoiler import GazBoiler | ||
from PyViCare.PyViCareUtils import PyViCareNotSupportedFeatureError | ||
|
||
|
||
class Vitodens333F(unittest.TestCase): | ||
def setUp(self): | ||
self.service = ViCareServiceMock('response/Vitodens333F.json') | ||
self.device = GazBoiler(self.service) | ||
|
||
def test_getBurnerActive(self): | ||
self.assertEqual(self.device.getBurnerActive(), False) | ||
|
||
def test_getBurnerStarts(self): | ||
self.assertEqual(self.device.circuits[0].getBurnerStarts(), 13987) | ||
|
||
def test_getBurnerHours(self): | ||
self.assertEqual(self.device.circuits[0].getBurnerHours(), 14071.8) | ||
|
||
def test_getBurnerModulation(self): | ||
self.assertEqual(self.device.circuits[0].getBurnerModulation(), 0) | ||
|
||
def test_getPrograms(self): | ||
expected_programs = ['active', 'comfort', 'eco', | ||
'external', 'holiday', 'normal', 'reduced', 'standby'] | ||
self.assertListEqual( | ||
self.device.circuits[0].getPrograms(), expected_programs) | ||
|
||
def test_getModes(self): | ||
expected_modes = ['standby', 'dhw', 'dhwAndHeating', | ||
'forcedReduced', 'forcedNormal'] | ||
self.assertListEqual( | ||
self.device.circuits[0].getModes(), expected_modes) | ||
|
||
def test_getPowerConsumptionDays(self): | ||
expected_consumption = [0.097, 0.162, 0.166, | ||
0.162, 0.159, 0.173, 0.182, 0.159] | ||
self.assertEqual(self.device.getPowerConsumptionDays(), | ||
expected_consumption) | ||
|
||
def test_getFrostProtectionActive(self): | ||
self.assertEqual( | ||
self.device.circuits[0].getFrostProtectionActive(), False) | ||
|
||
def test_getDomesticHotWaterCirculationPumpActive(self): | ||
self.assertEqual( | ||
self.device.getDomesticHotWaterCirculationPumpActive(), False) | ||
|
||
def test_getDomesticHotWaterOutletTemperature(self): | ||
self.assertEqual( | ||
self.device.getDomesticHotWaterOutletTemperature(), 29.8) | ||
|
||
def test_getDomesticHotWaterCirculationSchedule(self): | ||
self.assertEqual( | ||
self.device.getDomesticHotWaterCirculationSchedule(), ['on']) | ||
|
||
def test_getOutsideTemperature(self): | ||
self.assertEqual( | ||
self.device.getOutsideTemperature(), 26.2) | ||
|
||
def test_getBoilerTemperature(self): | ||
self.assertEqual( | ||
self.device.getBoilerTemperature(), 35) |