1"""
2Pairing Test
3"""
4
5from bluetooth_test import bluetooth_base_test
6from utilities.main_utils import common_main
7
8# Number of seconds for the target to stay discoverable on Bluetooth.
9DISCOVERABLE_TIME = 120
10
11
12class MultiDeviceTest(bluetooth_base_test.BluetoothBaseTest):
13
14    def setup_test(self):
15        super().setup_test()
16        # Set Bluetooth name on target device.
17        self.target.mbs.btSetName('LookForMe!')
18
19    def test_bluetooth_discovery(self):
20        self.bt_utils.discover_secondary_from_primary()
21
22    def test_bluetooth_pair(self):
23        self.bt_utils.pair_primary_to_secondary()
24
25    def teardown_test(self):
26        self.bt_utils.unpair()
27        self.discoverer.mbs.btDisable()
28        self.target.mbs.btDisable()
29
30if __name__ == '__main__':
31    common_main()
32