Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_products_are_valid(dea_index: Index):
for product in dea_index.products.get_all():
validation_messages = [str(m) for m in eodatasets3.validate.validate_product(product.definition)]
assert validation_messages == [], f"{product.name} has validation issues: {validation_messages}"