| Index: build/android/pylib/device/device_utils_test.py
|
| diff --git a/build/android/pylib/device/device_utils_test.py b/build/android/pylib/device/device_utils_test.py
|
| index 580794ddb8c3aca0416ea622c590ebb3c7b4e9a9..1d5f9efed8fc619667ee1aefa8b153f05fb4c250 100755
|
| --- a/build/android/pylib/device/device_utils_test.py
|
| +++ b/build/android/pylib/device/device_utils_test.py
|
| @@ -19,6 +19,7 @@
|
| import sys
|
| import unittest
|
|
|
| +from pylib import android_commands
|
| from pylib import cmd_helper
|
| from pylib import constants
|
| from pylib import device_signal
|
| @@ -29,6 +30,11 @@
|
| from pylib.sdk import split_select
|
| from pylib.utils import mock_calls
|
|
|
| +# RunCommand from third_party/android_testrunner/run_command.py is mocked
|
| +# below, so its path needs to be in sys.path.
|
| +sys.path.append(os.path.join(
|
| + constants.DIR_SOURCE_ROOT, 'third_party', 'android_testrunner'))
|
| +
|
| sys.path.append(os.path.join(
|
| constants.DIR_SOURCE_ROOT, 'third_party', 'pymock'))
|
| import mock # pylint: disable=F0401
|
| @@ -49,6 +55,12 @@
|
| def testInitWithAdbWrapper(self):
|
| serial = '123456789abcdef0'
|
| a = adb_wrapper.AdbWrapper(serial)
|
| + d = device_utils.DeviceUtils(a)
|
| + self.assertEqual(serial, d.adb.GetDeviceSerial())
|
| +
|
| + def testInitWithAndroidCommands(self):
|
| + serial = '0fedcba987654321'
|
| + a = android_commands.AndroidCommands(device=serial)
|
| d = device_utils.DeviceUtils(a)
|
| self.assertEqual(serial, d.adb.GetDeviceSerial())
|
|
|
|
|