diff --git a/hubitatmaker/tests/test_types.py b/hubitatmaker/tests/test_types.py index 312d52f..f8fe817 100644 --- a/hubitatmaker/tests/test_types.py +++ b/hubitatmaker/tests/test_types.py @@ -16,3 +16,12 @@ def test_device_can_serialize(self) -> None: f"{d}", '', ) + + def test_device_records_last_update_time(self) -> None: + """A device should be serializable.""" + d = Device(device_details["6"]) + update = d.last_update + self.assertIsNotNone(update) + + d.update_attr("contact", "closed") + self.assertNotEqual(update, d.last_update)