-
Notifications
You must be signed in to change notification settings - Fork 11
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
1 parent
d6022e5
commit 1300191
Showing
6 changed files
with
153 additions
and
56 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
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
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
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
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
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,39 @@ | ||
"""Tests for HeatmiserThermostat and CRC Methods""" | ||
import unittest | ||
from heatmiserv3 import heatmiser | ||
from heatmiserv3 import connection | ||
from heatmiserv3 import crc16 | ||
import logging, sys | ||
from heatmiserv3.formats import message | ||
|
||
from .serial_stubs import MockUH1, MockHeatmiserPRT | ||
|
||
logging.basicConfig( | ||
stream=sys.stdout, | ||
level=logging.DEBUG, | ||
format="%(levelname)s - %(message)s" | ||
) | ||
|
||
|
||
class TestStubs(unittest.TestCase): | ||
""" | ||
This test case tests the PRT Thermostat in 5/2 mode, where there are 64 bytes of information | ||
""" | ||
|
||
def setUp(self): | ||
# @TODO - Setup the mock interface for serial to write the tests. | ||
self.uh1 = MockUH1 | ||
self.thermo1 = MockHeatmiserPRT(1, self.uh1) | ||
|
||
def test_thermo1_get_target_temperature(self): | ||
""" Initialises the thermo1 thermostat, and checks the temperature is at 21*C""" | ||
assert self.thermo1.get_target_temp() == 21 | ||
|
||
# def test_thermo1_set_target_temperature(self): | ||
# """ Initialises the thermo1 thermostat, and checks the temperature is at 21*C""" | ||
# self.thermo1.set_target_temp(22) | ||
# assert self.thermo1.get_target_temp() == 22 | ||
|
||
|
||
def tearDown(self): | ||
pass |