mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 10:08:23 +00:00
Add tests
This commit is contained in:
parent
739fc7ece2
commit
2f36311b54
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."
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user