OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 The Swarming Authors. All rights reserved. | 2 # Copyright 2014 The LUCI Authors. All rights reserved. |
3 # Use of this source code is governed by the Apache v2.0 license that can be | 3 # Use of this source code is governed by the Apache v2.0 license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Smoke test for Cloud Endpoints support in auth component. | 6 """Smoke test for Cloud Endpoints support in auth component. |
7 | 7 |
8 It launches app via dev_appserver and queries a bunch of cloud endpoints | 8 It launches app via dev_appserver and queries a bunch of cloud endpoints |
9 methods. | 9 methods. |
10 """ | 10 """ |
11 | 11 |
12 import unittest | 12 import unittest |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 response = self.app.client.json_request( | 78 response = self.app.client.json_request( |
79 '/_ah/api/testing_service/v1/who', headers={'X-Host-Token-V1': token}) | 79 '/_ah/api/testing_service/v1/who', headers={'X-Host-Token-V1': token}) |
80 self.assertEqual(200, response.http_code) | 80 self.assertEqual(200, response.http_code) |
81 self.assertEqual('host-name', response.body.get('host')) | 81 self.assertEqual('host-name', response.body.get('host')) |
82 | 82 |
83 | 83 |
84 if __name__ == '__main__': | 84 if __name__ == '__main__': |
85 fix_encoding.fix_encoding() | 85 fix_encoding.fix_encoding() |
86 gae_sdk_utils.setup_gae_env() | 86 gae_sdk_utils.setup_gae_env() |
87 unittest.main() | 87 unittest.main() |
OLD | NEW |