def test_addressgroup_deser_only_addresses(): """Test deserialization for a reference library with address groups.""" dict = {"name": "ag1", "addresses": ["1.1.1.1/24", "2.2.2.2"]} address_group = AddressGroup.from_dict(dict) assert len(address_group.addresses) == 2 assert len(address_group.childGroupNames) == 0
def test_addressgroup_deser_none_subfields(): """Test deserialization for a reference library with address groups.""" dict = {"name": "ag1"} address_group = AddressGroup.from_dict(dict) assert len(address_group.addresses) == 0 assert len(address_group.childGroupNames) == 0