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_identifier_schemes(app, db, minimal_record):
"""Test supported identifier schemes."""
supported_schemes = [s for s, _ in idutils.PID_SCHEMES]
minimal_record['related_identifiers'] = [
{'scheme': scheme, 'relation': 'references', 'identifier': 'foobar'}
for scheme in supported_schemes
]
# JSONSchema validation should allow all supported schemes
Record.create(minimal_record)