def METHOD_NAME(get, post, job_template, admin, kind):
    cred_type = CredentialType.defaults[kind]()
    cred_type.save()
    cred = Credential(
        name='Some Cred',
        credential_type=cred_type,
        inputs={
            'username': 'bob',
            'password': 'secret',
        },
    )
    cred.save()
    url = reverse('api:job_template_launch', kwargs={'pk': job_template.pk})
    resp = post(url, {'credentials': [cred.pk]}, admin, expect=400)
    assert 'Cannot assign a Credential of kind `{}`'.format(kind) in resp.data.get('credentials', [])
    assert Job.objects.count() == 0