Skip to content

Commit

Permalink
Tweak tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rrooggiieerr committed Jun 27, 2024
1 parent 95f4795 commit 200d8c4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/protocols/test_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
logging.basicConfig(level=logging.DEBUG)


class TestSwitch1(unittest.TestCase):
class TestGeneric(unittest.TestCase):
def test_decode_1(self) -> None:
decoded = generic.decode(
"020102010201020101020102010201020102020101020201020102010102020101020201010202010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201010203"
Expand Down
4 changes: 3 additions & 1 deletion tests/protocols/test_switch1.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def test_decode_1(self) -> None:
decoded = switch1.decode(
"020100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010000010100000100010001000103"
)
assert decoded == {"id": 67108863, "all": False, "state": True, "unit": 0}
self.assertDictEqual(
{"id": 67108863, "all": False, "state": True, "unit": 0}, decoded
)

def test_decode_2(self) -> None:
decoded = switch1.decode(
Expand Down
2 changes: 1 addition & 1 deletion tests/protocols/test_switch3.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_decode_1(self) -> None:
#
# def test_decode_3(self) -> None:
# decoded = switch3.decode('01010110010101100110011001100110010101100110011002')
# assert decoded == {'unit': 20, 'id': 2, 'state': True}
# self.assertDictEqual({'unit': 20, 'id': 2, 'state': True}, decoded)

def test_encode_1(self) -> None:
encoded = switch3.encode(id=25, unit=16, state=False)
Expand Down

0 comments on commit 200d8c4

Please sign in to comment.