UT: Add test_hardware_id_default()

This commit is contained in:
Mike Salvatore 2022-08-29 20:30:07 -04:00
parent ac1cda40a8
commit 5713d1c99b
1 changed files with 9 additions and 0 deletions

View File

@ -121,6 +121,15 @@ def test_hardware_id_validate_on_set():
m.hardware_id = -50
def test_hardware_id_default():
missing_hardware_id_dict = MACHINE_OBJECT_DICT.copy()
del missing_hardware_id_dict["hardware_id"]
m = Machine(**missing_hardware_id_dict)
assert m.hardware_id is None
def test_network_interfaces_set_valid_value():
m = Machine(**MACHINE_OBJECT_DICT)