in src/rpdk/core/test.py [0:0]
def get_inputs(root, region_name, endpoint_url, value, role_arn):
inputs = {}
if not root:
return None
path = root / INPUTS
if not os.path.isdir(path):
return None
file_prefix = INPUTS + "_" + str(value)
directories = os.listdir(path)
if len(directories) > 0:
for file in directories:
if file.startswith(file_prefix) and file.endswith(".json"):
input_type = get_type(file)
if not input_type:
continue
file_path = path / file
with file_path.open("r", encoding="utf-8") as f:
overrides_raw = render_jinja(
f.read(), region_name, endpoint_url, role_arn
)
overrides = {}
for pointer, obj in overrides_raw.items():
overrides[pointer] = obj
inputs[input_type] = overrides
return inputs
return None