Merge pull request #304 from ryanpetrello/required-cred-fields

mark a variety of credential fields as required
This commit is contained in:
Ryan Petrello
2017-08-18 17:02:24 -04:00
committed by GitHub
3 changed files with 14 additions and 7 deletions
@@ -748,6 +748,7 @@ def test_falsey_field_data(get, post, organization, admin, field_value):
'credential_type': net.pk,
'organization': organization.id,
'inputs': {
'username': 'joe-user', # username is required
'authorize': field_value
}
}
+1 -1
View File
@@ -226,7 +226,7 @@ def test_credential_creation_validation_failure(organization_factory, inputs):
[EXAMPLE_PRIVATE_KEY.replace('=', '\u003d'), None, True], # automatically fix JSON-encoded GCE keys
])
def test_ssh_key_data_validation(organization, kind, ssh_key_data, ssh_key_unlock, valid):
inputs = {}
inputs = {'username': 'joe-user'}
if ssh_key_data:
inputs['ssh_key_data'] = ssh_key_data
if ssh_key_unlock: