mirror of
https://github.com/home-assistant/core.git
synced 2025-08-31 02:11:32 +02:00
Add tests
This commit is contained in:
14
tests/helpers/test_service_info.py
Normal file
14
tests/helpers/test_service_info.py
Normal 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."
|
||||
)
|
Reference in New Issue
Block a user