X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ice_validator%2Ftests%2Ftest_network_format.py;h=23e46f9d3bff90d53d2387a11361fc82c1fb6e03;hb=HEAD;hp=b291c535a3059f3af1b9dc066cf60180be64d673;hpb=5706da0c7f430c01a0cebb534f1a965ee9b5cca7;p=vvp%2Fvalidation-scripts.git diff --git a/ice_validator/tests/test_network_format.py b/ice_validator/tests/test_network_format.py index b291c53..23e46f9 100644 --- a/ice_validator/tests/test_network_format.py +++ b/ice_validator/tests/test_network_format.py @@ -79,7 +79,7 @@ def test_network_has_subnet(yaml_file): networks = [] - for k, v in yml["resources"].items(): + for k, v in yml.get("resources", {}).items(): if not has_properties(v) or v.get("type") not in ["OS::Neutron::Net"]: continue # need to check if contrail networks also require subnet @@ -87,7 +87,7 @@ def test_network_has_subnet(yaml_file): # if v.get("type") not in NETWORK_RESOURCE_TYPES: networks.append(k) - for k, v in yml["resources"].items(): + for k, v in yml.get("resources", {}).items(): network_prop = v.get("properties", {}).get("network", {}).get("get_resource") if ( not has_properties(v)