'If a non-admin user creates an app, an administrator should be able to add
domains to it.'

def test_admin_can_add_domains_to_other_apps(self):

    user = User.objects.get(username=u'autotest2')
    token = Token.objects.get(user=user).key
    url = u'/v1/apps'
    response = self.client.post(url, HTTP_AUTHORIZATION=u'token    {}'.format(token))
    self.assertEqual(response.status_code, 201)
    url = u'/v1/apps/{}/domains'.format(self.app_id)
    body = {u'domain': u'example.deis.example.com'}
    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)
