pylint fixing for {cvd,gcompute}_compute_client and device_driver.
Also fixed up the unittests to use mock.patch appropriately.
Bug: None
Test: pylint and run_tests.sh pass
Change-Id: I5aaf4e8a17bf354a4428e2517f496b63edb8ed6e
diff --git a/public/device_driver.py b/public/device_driver.py
index 810a3a8..31cbb12 100755
--- a/public/device_driver.py
+++ b/public/device_driver.py
@@ -62,6 +62,7 @@
ADB_CONNECT_CMD = "adb connect 127.0.0.1:%(adb_port)d"
+# pylint: disable=invalid-name
class AndroidVirtualDevicePool(object):
"""A class that manages a pool of devices."""
@@ -375,6 +376,7 @@
vnc_port)
+# pylint: disable=too-many-locals
def CreateAndroidVirtualDevices(cfg,
build_target=None,
build_id=None,
@@ -631,7 +633,7 @@
"""
credentials = auth.CreateCredentials(cfg, ALL_SCOPES)
compute_client = android_compute_client.AndroidComputeClient(
- cfg, credentials)
+ cfg, credentials)
logger.info("Checking if user has access to project %s", cfg.project)
if not compute_client.CheckAccess():
logger.error("User does not have access to project %s", cfg.project)