1"""
2Bluetooth ThreeDeviceTestBed Base Test
3
4This test class serves as a base class for tests which needs three devices
5
6"""
7
8import sys
9
10from mobly import test_runner
11from mobly.controllers import android_device
12
13from utilities import spectatio_utils
14from utilities import bt_utils
15from bluetooth_test import bluetooth_base_test
16
17class BluetoothSMSBaseTest(bluetooth_base_test.BluetoothBaseTest):
18
19
20    def setup_class(self):
21        # Registering android_device controller module and declaring the three devices
22
23        self.ads = self.register_controller(android_device, min_number=3)
24        # The device used to discover Bluetooth devices.
25        self.discoverer = android_device.get_device(
26            self.ads, label='auto')
27        # Sets the tag that represents this device in logs.
28        self.discoverer.debug_tag = 'discoverer'
29        # The device that is expected to be discovered
30        self.target = android_device.get_device(self.ads, label='phone')
31        self.target.debug_tag = 'target'
32        self.target.load_snippet('mbs', android_device.MBS_PACKAGE)
33        self.discoverer.load_snippet('mbs', android_device.MBS_PACKAGE)
34
35        self.phone_notpaired = android_device.get_device(self.ads, label='phone_notpaired')
36        self.phone_notpaired.debug_tag = 'phone_notpaired'
37        self.phone_notpaired.load_snippet('mbs', android_device.MBS_PACKAGE)
38
39        self.call_utils = (spectatio_utils.CallUtils(self.discoverer))
40        self.bt_utils = (bt_utils.BTUtils(self.discoverer, self.target))
41
42
43if __name__ == '__main__':
44    common_main()
45