'If the administrator has not provided SSH private key for run commands,
make sure a friendly error message is provided on run'

def test_run_without_auth(self):

    settings.SSH_PRIVATE_KEY = u''
    url = u'/v1/apps'
    body = {u'id': u'autotest'}
    response = self.client.post(url, json.dumps(body), content_type=u'application/json', HTTP_AUTHORIZATION=u'token    {}'.format(self.token))
    self.assertEqual(response.status_code, 201)
    app_id = response.data[u'id']
    url = u'/v1/apps/{app_id}/run'.format(**locals())
    body = {u'command': u'ls    -al'}
    response = self.client.post(url, json.dumps(body), content_type=u'application/json', HTTP_AUTHORIZATION=u'token    {}'.format(self.token))
    self.assertEquals(response.status_code, 400)
    self.assertEquals(response.data, {u'detail': u'Support    for    admin    commands    is    not    configured'})
