OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Setups a local GAE instance to test against a live server for integration | 5 """Setups a local GAE instance to test against a live server for integration |
6 tests. | 6 tests. |
7 | 7 |
8 It makes sure Google AppEngine SDK is found and starts the server on a free | 8 It makes sure Google AppEngine SDK is found and starts the server on a free |
9 inbound TCP port. | 9 inbound TCP port. |
10 """ | 10 """ |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 interactive = self.get('console', url=self.admin_url) | 218 interactive = self.get('console', url=self.admin_url) |
219 match = re.search(r"'xsrf_token': *'(.*?)'", interactive) | 219 match = re.search(r"'xsrf_token': *'(.*?)'", interactive) |
220 if not match: | 220 if not match: |
221 logging.debug('interactive console output:\n%s', interactive) | 221 logging.debug('interactive console output:\n%s', interactive) |
222 raise Failure('could not find xsrf_token') | 222 raise Failure('could not find xsrf_token') |
223 self._xsrf_token = match.group(1) | 223 self._xsrf_token = match.group(1) |
224 self.clear_cookies() | 224 self.clear_cookies() |
225 return self._xsrf_token | 225 return self._xsrf_token |
226 | 226 |
227 # vim: ts=2:sw=2:tw=80:et: | 227 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |