Skip to content

Commit

Permalink
Issue #114: invert scaling value - fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Julius2342 committed Mar 4, 2018
1 parent ce0da1b commit 7d5e54f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/sensor_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_str_scaling(self):
value_type="percent")
sensor.sensor_value.payload = DPTArray((0x40,))

self.assertEqual(sensor.resolve_state(), 75)
self.assertEqual(sensor.resolve_state(), 25)
self.assertEqual(sensor.unit_of_measurement(), "%")

def test_str_speed_ms(self):
Expand Down
2 changes: 1 addition & 1 deletion test/str_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def test_sensor(self):
self.loop.run_until_complete(asyncio.Task(sensor.sensor_value.set(25)))
self.assertEqual(
str(sensor),
'<Sensor name="MeinSensor" sensor="None/GroupAddress("1/2/3")/<DPTArray value="[0xbf]" />/25" value="25" unit="%"/>')
'<Sensor name="MeinSensor" sensor="None/GroupAddress("1/2/3")/<DPTArray value="[0x40]" />/25" value="25" unit="%"/>')

def test_expose_sensor(self):
"""Test string representation of expose sensor object."""
Expand Down

0 comments on commit 7d5e54f

Please sign in to comment.