-
-
-@validates("R-52530")
-@pytest.mark.base
-def test_07_nested_template_in_same_directory(yaml_file):
-
- missing_files = []
-
- with open(yaml_file) as fh:
- yml = yaml.load(fh)
-
- # skip if resources are not defined
- if "resources" not in yml:
- pytest.skip("No resources specified in the heat template")
-
- dirname = os.path.dirname(yaml_file)
- list_of_files = get_list_of_nested_files(yml, dirname)
- dir_files = listdir(dirname)
- for file in list_of_files:
- base_name = path.basename(file)
- if base_name not in dir_files:
- missing_files.append(base_name)
-
- assert (
- not missing_files
- ), "Missing nested files in heat template directory {}".format(missing_files)