1# Copyright (C) 2023 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15import sys 16 17from bluetooth_test import bluetooth_base_test 18 19from mobly import asserts 20from utilities.main_utils import common_main 21 22 23class BTSMSDeviceNotPairedTest(bluetooth_base_test.BluetoothBaseTest): 24 25 def setup_test(self): 26 # Disable BT on devices 27 self.target.mbs.btDisable() 28 self.discoverer.mbs.btDisable() 29 30 def test_messenger_device_not_paired(self): 31 """Tests launches SMS Audio app and verify <Bluetooth Disconnected> displayed.""" 32 self.call_utils.open_bluetooth_sms_app() 33 asserts.assert_true(self.call_utils.is_bluetooth_sms_disconnected_label_visible(), 34 '<Bluetooth SMS disconnected> label should be present') 35 36 37if __name__ == '__main__': 38 common_main() 39