Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Unified Diff: build/android/devil/utils/mock_calls_test.py

Issue 1325143002: [Android] Move Android version codes into devil/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/devil/android/sdk/version_codes.py ('k') | build/android/provision_devices.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/devil/utils/mock_calls_test.py
diff --git a/build/android/devil/utils/mock_calls_test.py b/build/android/devil/utils/mock_calls_test.py
index 2e8780642cd41092bdb9cb14531cd7608d106834..ae2acbb8322c372d1155d030ab0e242124570145 100755
--- a/build/android/devil/utils/mock_calls_test.py
+++ b/build/android/devil/utils/mock_calls_test.py
@@ -12,6 +12,7 @@ import os
import sys
import unittest
+from devil.android.sdk import version_codes
from devil.utils import mock_calls
from pylib import constants
@@ -41,7 +42,7 @@ class _DummyAdb(object):
@property
def build_version_sdk(self):
logging.debug('(device %s) getting build_version_sdk', self)
- return constants.ANDROID_SDK_VERSION_CODES.LOLLIPOP
+ return version_codes.LOLLIPOP
class TestCaseWithAssertCallsTest(mock_calls.TestCase):
@@ -97,15 +98,12 @@ class TestCaseWithAssertCallsTest(mock_calls.TestCase):
self.adb.Shell('echo hello')
def testPatchCall_property(self):
- self.assertEquals(constants.ANDROID_SDK_VERSION_CODES.LOLLIPOP,
- self.adb.build_version_sdk)
+ self.assertEquals(version_codes.LOLLIPOP, self.adb.build_version_sdk)
with self.patch_call(
self.call.adb.build_version_sdk,
- return_value=constants.ANDROID_SDK_VERSION_CODES.KITKAT):
- self.assertEquals(constants.ANDROID_SDK_VERSION_CODES.KITKAT,
- self.adb.build_version_sdk)
- self.assertEquals(constants.ANDROID_SDK_VERSION_CODES.LOLLIPOP,
- self.adb.build_version_sdk)
+ return_value=version_codes.KITKAT):
+ self.assertEquals(version_codes.KITKAT, self.adb.build_version_sdk)
+ self.assertEquals(version_codes.LOLLIPOP, self.adb.build_version_sdk)
def testAssertCalls_succeeds_simple(self):
self.assertEquals(42, self.get_answer())
« no previous file with comments | « build/android/devil/android/sdk/version_codes.py ('k') | build/android/provision_devices.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698