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# # 15# Copyright (C) 2023 The Android Open Source Project 16# 17# Licensed under the Apache License, Version 2.0 (the "License"); 18# you may not use this file except in compliance with the License. 19# You may obtain a copy of the License at 20# 21# http://www.apache.org/licenses/LICENSE-2.0 22# 23# Unless required by applicable law or agreed to in writing, software 24# distributed under the License is distributed on an "AS IS" BASIS, 25# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 26# See the License for the specific language governing permissions and 27# limitations under the License. 28 29 30from bluetooth_sms_test import bluetooth_sms_base_test 31 32from mobly import asserts 33from utilities.main_utils import common_main 34 35 36class BTSMSUtilityTest(bluetooth_sms_base_test.BluetoothSMSBaseTest): 37 38 def test_sms_poc(self): 39 """Tests launches SMS app and also tests bt status all three devices for the poc""" 40 41 # opening the sms app 42 self.call_utils.open_bluetooth_sms_app() 43 self.phone_notpaired.mbs.btDisable() 44 45 # tests bt status of all three allocated devices 46 asserts.assert_true(self.target.mbs.btIsEnabled(), 47 '<Bluetooth> should be ON') 48 asserts.assert_true(self.discoverer.mbs.btIsEnabled(), 49 '<Bluetooth> should be ON') 50 asserts.assert_false(self.phone_notpaired.mbs.btIsEnabled(), 51 '<Bluetooth> should be OFF') 52 53 54if __name__ == '__main__': 55 common_main() 56