Add tests

This commit is contained in:
epenet
2025-07-01 09:45:42 +00:00
parent 558d749240
commit cf7b1d0e09

View File

@@ -0,0 +1,14 @@
"""Test service_info helpers."""
from homeassistant.helpers.service_info.dhcp import DhcpServiceInfo
# Ensure that DhcpServiceInfo.__post_init__ is called, even on a constant outside of a test
try:
_ = DhcpServiceInfo(ip="", hostname="", macaddress="AA:BB:CC:DD:EE:FF")
except ValueError:
pass
else:
raise RuntimeError(
"DhcpServiceInfo.__post_init__ was not called. "
"Please ensure that the __post_init__ method is correctly defined."
)