-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
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,32 @@ | ||
import unittest | ||
|
||
from PyViCare.PyViCareUtils import PyViCareNotSupportedFeatureError | ||
from PyViCare.PyViCareVentilationDevice import VentilationDevice | ||
from tests.ViCareServiceMock import ViCareServiceMock | ||
|
||
|
||
class Vitocal200(unittest.TestCase): | ||
def setUp(self): | ||
self.service = ViCareServiceMock('response/Vitocal111S.json') | ||
self.device = VentilationDevice(self.service) | ||
|
||
def test_ventilation_state(self): | ||
self.assertEqual(self.device.getVentilationDemand(), "ventilation") | ||
self.assertEqual(self.device.getVentilationLevel(), "levelOne") | ||
self.assertEqual(self.device.getVentilationReason(), "schedule") | ||
|
||
def test_ventilationQuickmode(self): | ||
# quickmodes disabled | ||
with self.assertRaises(PyViCareNotSupportedFeatureError): | ||
self.device.getVentilationQuickmode("comfort") | ||
with self.assertRaises(PyViCareNotSupportedFeatureError): | ||
self.device.getVentilationQuickmode("eco") | ||
with self.assertRaises(PyViCareNotSupportedFeatureError): | ||
self.device.getVentilationQuickmode("holiday") | ||
|
||
def test_ventilationQuickmodes(self): | ||
self.assertEqual(self.device.getVentilationQuickmodes(), [ | ||
"comfort", | ||
"eco", | ||
"holiday", | ||
]) |