OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # pylint: disable=protected-access | 6 # pylint: disable=protected-access |
7 | 7 |
8 import logging | 8 import logging |
9 import sys | 9 import sys |
10 import unittest | 10 import unittest |
(...skipping 30 matching lines...) Expand all Loading... |
41 def mock_environment(env_var): | 41 def mock_environment(env_var): |
42 return '/my/fake/adb/path' if env_var == 'ADB_PATH' else None | 42 return '/my/fake/adb/path' if env_var == 'ADB_PATH' else None |
43 | 43 |
44 with mock.patch('os.environ.get', | 44 with mock.patch('os.environ.get', |
45 mock.Mock(side_effect=mock_environment)): | 45 mock.Mock(side_effect=mock_environment)): |
46 env_config = devil_env._GetEnvironmentVariableConfig() | 46 env_config = devil_env._GetEnvironmentVariableConfig() |
47 self.assertEquals( | 47 self.assertEquals( |
48 { | 48 { |
49 'adb': { | 49 'adb': { |
50 'file_info': { | 50 'file_info': { |
51 'android_linux2': { | 51 'linux_x86_64': { |
52 'local_paths': ['/my/fake/adb/path'], | 52 'local_paths': ['/my/fake/adb/path'], |
53 }, | 53 }, |
54 }, | 54 }, |
55 }, | 55 }, |
56 }, | 56 }, |
57 env_config.get('dependencies')) | 57 env_config.get('dependencies')) |
58 | 58 |
59 | 59 |
60 if __name__ == '__main__': | 60 if __name__ == '__main__': |
61 logging.getLogger().setLevel(logging.DEBUG) | 61 logging.getLogger().setLevel(logging.DEBUG) |
62 unittest.main(verbosity=2) | 62 unittest.main(verbosity=2) |
OLD | NEW |