Make BtCmdLineTool more readable
Bug: 63139124
Test: Manual
Change-Id: Ia70257d52db7d46ff0f8aa1d27953a583697630d
diff --git a/acts/tests/google/bt/pts/BtCmdLineTest.py b/acts/tests/google/bt/pts/BtCmdLineTest.py
index cb97233..2e81163 100644
--- a/acts/tests/google/bt/pts/BtCmdLineTest.py
+++ b/acts/tests/google/bt/pts/BtCmdLineTest.py
@@ -24,9 +24,12 @@
from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
from cmd_input import CmdInput
from queue import Empty
+
import os
import uuid
+from acts.test_utils.tel.tel_test_utils import setup_droid_properties
+
class BtCmdLineTest(BluetoothBaseTest):
target_mac_address = ""
@@ -37,7 +40,8 @@
self.log.error(
"Missing mandatory user config \"target_mac_address\"!")
return False
- self.target_mac_address = self.user_params["target_mac_address"].upper()
+ self.target_mac_address = self.user_params["target_mac_address"].upper(
+ )
self.android_devices[0].droid.bluetoothSetLocalName("CMD LINE Test")
if len(self.android_devices) > 1:
@@ -46,7 +50,7 @@
self.log.error(
"Missing mandatory user config \"sim_conf_file\"!")
return False
- sim_conf_file = self.user_params["sim_conf_file"]
+ sim_conf_file = self.user_params["sim_conf_file"][0]
# If the sim_conf_file is not a full path, attempt to find it
# relative to the config file.
if not os.path.isfile(sim_conf_file):
@@ -61,7 +65,7 @@
music_path_str = "music_path"
android_music_path = "/sdcard/Music/"
if music_path_str not in self.user_params:
- log.error("Need music for A2DP testcases")
+ self.log.error("Need music for A2DP testcases")
return False
music_path = self.user_params[music_path_str]
self._add_music_to_primary_android_device(music_path,
@@ -74,8 +78,8 @@
for filename in filenames:
file = os.path.join(dirname, filename)
#TODO: Handle file paths with spaces
- self.android_devices[0].adb.push(
- "{} {}".format(file, android_music_path))
+ self.android_devices[0].adb.push("{} {}".format(
+ file, android_music_path))
def setup_class(self):
return True