How to use the idutils.PID_SCHEMES function in idutils

To help you get started, we’ve selected a few idutils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zenodo / zenodo / tests / unit / records / test_schemas.py View on Github external
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)