OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 """Environment setup and teardown for remote devices.""" | 5 """Environment setup and teardown for remote devices.""" |
6 | 6 |
7 import distutils.version | 7 import distutils.version |
8 import json | 8 import json |
9 import logging | 9 import logging |
10 import os | 10 import os |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 self._collect = True | 176 self._collect = True |
177 else: | 177 else: |
178 self._trigger = args.trigger | 178 self._trigger = args.trigger |
179 self._collect = args.collect | 179 self._collect = args.collect |
180 | 180 |
181 def SetUp(self): | 181 def SetUp(self): |
182 """Set up the test environment.""" | 182 """Set up the test environment.""" |
183 os.environ['APPURIFY_API_PROTO'] = self._api_protocol | 183 os.environ['APPURIFY_API_PROTO'] = self._api_protocol |
184 os.environ['APPURIFY_API_HOST'] = self._api_address | 184 os.environ['APPURIFY_API_HOST'] = self._api_address |
185 os.environ['APPURIFY_API_PORT'] = self._api_port | 185 os.environ['APPURIFY_API_PORT'] = self._api_port |
| 186 os.environ['APPURIFY_STATUS_BASE_URL'] = 'none' |
186 self._GetAccessToken() | 187 self._GetAccessToken() |
187 if self._trigger: | 188 if self._trigger: |
188 self._SelectDevice() | 189 self._SelectDevice() |
189 | 190 |
190 def TearDown(self): | 191 def TearDown(self): |
191 """Teardown the test environment.""" | 192 """Teardown the test environment.""" |
192 self._RevokeAccessToken() | 193 self._RevokeAccessToken() |
193 | 194 |
194 def __enter__(self): | 195 def __enter__(self): |
195 """Set up the test run when used as a context manager.""" | 196 """Set up the test run when used as a context manager.""" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 def trigger(self): | 343 def trigger(self): |
343 return self._trigger | 344 return self._trigger |
344 | 345 |
345 @property | 346 @property |
346 def verbose_count(self): | 347 def verbose_count(self): |
347 return self._verbose_count | 348 return self._verbose_count |
348 | 349 |
349 @property | 350 @property |
350 def device_type(self): | 351 def device_type(self): |
351 return self._device_type | 352 return self._device_type |
OLD | NEW |