Skip to content

Commit

Permalink
Better unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
derjoerg committed Nov 9, 2024
1 parent 1d82b07 commit bf0558f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 6 additions & 0 deletions tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,9 @@ def test_remove_callback(base_instance):
base_instance.register_callback(callback)
base_instance.remove_callback(callback)
assert callback not in base_instance._callbacks


def test_update_device(base_instance):
"""Test when input-datapoint is provided."""

base_instance.update_device("AL_SWITCH_ON_OFF/idp0000", "1")
4 changes: 0 additions & 4 deletions tests/test_switch_actuator.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,3 @@ def test_callback():
# Test scenario where websocket sends update not relevant to the state.
switch_actuator.update_device("AL_INFO_ON_OFF/odp0001", "1")
assert switch_actuator.state is False

# Test scenario where websocket sends update not relevant to the state.
switch_actuator.update_device("AL_SWITCH_ON_OFF/idp0000", "1")
assert switch_actuator.state is False

0 comments on commit bf0558f

Please sign in to comment.