1""" 2Pairing Test 3""" 4 5from mobly import asserts 6from mobly import test_runner 7from bluetooth_test import bluetooth_base_test 8from utilities.main_utils import common_main 9 10 11class DialerHFPError(bluetooth_base_test.BluetoothBaseTest): 12 """Enable and Disable Bluetooth from Bluetooth Palette.""" 13 14 def setup_test(self): 15 """Setup steps before any test is executed.""" 16 # Pair caller phone with automotive device 17 self.bt_utils.pair_primary_to_secondary() 18 super().enable_recording() 19 20 21 def test_dialer_hfp_error(self): 22 """Disable - Enable Phone-HFP Bluetooth profile""" 23 self.call_utils.open_phone_app() 24 self.call_utils.wait_with_log(5) 25 self.target.mbs.btDisable() 26 self.call_utils.wait_with_log(5) 27 asserts.assert_true(self.call_utils.is_bluetooth_hfp_error_displayed(),'hfp error is displayed') 28 29 def teardown_test(self): 30 # enabling the Bluetooth 31 self.target.mbs.btEnable() 32 super().teardown_test() 33 34if __name__ == '__main__': 35 common_main() 36