in src/rpdk/core/contract/resource_client.py [0:0]
def validate_model_contain_tags(self, inputs):
assertion_error_message = "Contract test inputs does not contain tags property."
try:
tag_property_path = self._schema["tagging"]["tagProperty"]
except KeyError:
tag_property_path = "/properties/Tags"
tag_property_name = tag_property_path.split("/")[-1]
LOG.debug("Defined tag property name is: %s\n", tag_property_name)
try:
if isinstance(inputs, dict):
for key in inputs:
if key == tag_property_name:
return True
else:
raise assertion_error_message
except Exception as exception:
raise AssertionError(assertion_error_message) from exception
return False