def test_scale_with_unauthorized_user_returns_403(self):
        url = '/v1/apps'
        response = self.client.post(url, HTTP_AUTHORIZATION='token {}'.format(self.token))
        self.assertEqual(response.status_code, 201)
        app_id = response.data['id']
        # post a new build
        url = "/v1/apps/{app_id}/builds".format(**locals())
        body = {'image': 'autotest/example', 'sha': 'a'*40,
                'procfile': json.dumps({'web': 'node server.js', 'worker': 'node worker.js'})}
        response = self.client.post(url, json.dumps(body), content_type='application/json',
                                    HTTP_AUTHORIZATION='token {}'.format(self.token))
        unauthorized_user = User.objects.get(username='autotest2')
        unauthorized_token = Token.objects.get(user=unauthorized_user).key
        # scale up with unauthorized user
        url = "/v1/apps/{app_id}/scale".format(**locals())
        body = {'web': 4}
        response = self.client.post(url, json.dumps(body), content_type='application/json',
                                    HTTP_AUTHORIZATION='token {}'.format(unauthorized_token))
        self.assertEqual(response.status_code, 403)
Do linting check for all open files and store results.
dataset/ETHPy150Open deis/deis/controller/api/tests/test_container.py/ContainerTest.test_scale_with_unauthorized_user_returns_403--crossover with--dataset/ETHPy150Open richrd/suplemon/suplemon/modules/linter.py/Linter.lint_all_files