Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ernst79 committed Sep 23, 2023
1 parent cba5312 commit d79a2bd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/ble_monitor/test/test_bthome_v2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""The tests for the BTHome (DIY sensor) ble_parser."""
import datetime

from ble_monitor.ble_parser import BleParser


Expand Down Expand Up @@ -759,7 +761,7 @@ def test_bthome_v2_timestamp(self):
assert sensor_msg["mac"] == "5448E68F80A5"
assert sensor_msg["packet"] == "no packet id"
assert sensor_msg["data"]
assert sensor_msg["timestamp"] == "2023-5-14, 19:41:17"
assert sensor_msg["timestamp"] == datetime.datetime(2023, 5, 14, 19, 41, 17, tzinfo=datetime.timezone.utc)
assert sensor_msg["rssi"] == -52

def test_bthome_v2_acceleration(self):
Expand Down Expand Up @@ -810,7 +812,7 @@ def test_bthome_v2_text(self):
assert sensor_msg["mac"] == "5448E68F80A5"
assert sensor_msg["packet"] == "no packet id"
assert sensor_msg["data"]
assert sensor_msg["text"] == 22.151
assert sensor_msg["text"] == "Hello World!"
assert sensor_msg["rssi"] == -52

def test_bthome_v2_double_temperature(self):
Expand Down

0 comments on commit d79a2bd

Please sign in to comment.