def test_extension_schema(client): from lemur.certificates.schemas import ExtensionSchema input_data = { "keyUsage": {"useKeyEncipherment": True, "useDigitalSignature": True}, "extendedKeyUsage": {"useServerAuthentication": True}, "subjectKeyIdentifier": {"includeSKI": True}, } data, errors = ExtensionSchema().load(input_data) assert not errors data, errors = ExtensionSchema().dump(data) assert not errors
def test_extension_schema(client): from lemur.certificates.schemas import ExtensionSchema input_data = { 'keyUsage': { 'useKeyEncipherment': True, 'useDigitalSignature': True }, 'extendedKeyUsage': { 'useServerAuthentication': True }, 'subjectKeyIdentifier': { 'includeSKI': True } } data, errors = ExtensionSchema().load(input_data) assert not errors data, errors = ExtensionSchema().dump(data) assert not errors
def test_extension_schema(client): from lemur.certificates.schemas import ExtensionSchema input_data = { 'keyUsage': { 'useKeyEncipherment': True, 'useDigitalSignature': True }, 'extendedKeyUsage': { 'useServerAuthentication': True }, 'subjectKeyIdentifier': { 'includeSKI': True }, 'subAltNames': { 'names': [ {'nameType': 'DNSName', 'value': 'test.example.com'} ] } } data, errors = ExtensionSchema().load(input_data) assert not errors