当前位置: 首页>>代码示例>>Python>>正文


Python CallScreen.hang_up方法代码示例

本文整理汇总了Python中gaiatest.apps.phone.regions.call_screen.CallScreen.hang_up方法的典型用法代码示例。如果您正苦于以下问题:Python CallScreen.hang_up方法的具体用法?Python CallScreen.hang_up怎么用?Python CallScreen.hang_up使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gaiatest.apps.phone.regions.call_screen.CallScreen的用法示例。


在下文中一共展示了CallScreen.hang_up方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_receive_call

# 需要导入模块: from gaiatest.apps.phone.regions.call_screen import CallScreen [as 别名]
# 或者: from gaiatest.apps.phone.regions.call_screen.CallScreen import hang_up [as 别名]
    def test_receive_call(self):
        """Make a phone call from Plivo to the phone."""
        PLIVO_TIMEOUT = 30

        self.plivo = PlivoUtil(
            self.testvars['plivo']['auth_id'],
            self.testvars['plivo']['auth_token'],
            self.testvars['plivo']['phone_number']
        )
        self.call_uuid = self.plivo.make_call(
            to_number=self.testvars['carrier']['phone_number'].replace('+', ''),
            timeout=PLIVO_TIMEOUT)

        call_screen = CallScreen(self.marionette)
        call_screen.wait_for_incoming_call()
        call_screen.answer_call()

        # Wait for Plivo to report the call as connected
        Wait(self.plivo, timeout=PLIVO_TIMEOUT).until(
            lambda p: p.is_call_connected(self.call_uuid),
            message='The call was not connected.')

        # Wait for the state to be connected
        call_screen.wait_for_condition(
            lambda m: self.data_layer.active_telephony_state == 'connected',
            timeout=30)

        call_screen.hang_up()

        # Wait for Plivo to report the call as completed
        Wait(self.plivo, timeout=PLIVO_TIMEOUT).until(
            lambda p: p.is_call_completed(self.call_uuid),
            message='The call was not completed.')
        self.call_uuid = None
开发者ID:JasonWeathersby,项目名称:gaia,代码行数:36,代码来源:test_dialer_receive_call.py

示例2: test_dsds_receive_call_on_both_sims

# 需要导入模块: from gaiatest.apps.phone.regions.call_screen import CallScreen [as 别名]
# 或者: from gaiatest.apps.phone.regions.call_screen.CallScreen import hang_up [as 别名]
    def test_dsds_receive_call_on_both_sims(self, sim_value, sim_name):
        """Make a phone call from Plivo to each SIM."""

        from gaiatest.utils.plivo.plivo_util import PlivoUtil
        self.plivo = PlivoUtil(
            self.testvars['plivo']['auth_id'],
            self.testvars['plivo']['auth_token'],
            self.testvars['plivo']['phone_number']
        )
        self.call_uuid = self.plivo.make_call(
            to_number=self.testvars['local_phone_numbers'][sim_value].replace('+', ''))

        call_screen = CallScreen(self.marionette)
        call_screen.wait_for_incoming_call()

        # TODO Replace the following line by a check on the l10n ID
        # once bug 1104667 lands
        self.assertTrue(sim_name in call_screen.incoming_via_sim)

        call_screen.answer_call()
        self.plivo.wait_for_call_connected(self.call_uuid)
        Wait(self.marionette).until(lambda m: self.data_layer.active_telephony_state == 'connected')

        # TODO Replace the following line by a check on the l10n ID
        # once bug 1104667 lands
        self.assertTrue(sim_name in call_screen.incoming_via_sim)

        call_screen.hang_up()
        self.plivo.wait_for_call_completed(self.call_uuid)
        self.call_uuid = None
开发者ID:AutomatedTester,项目名称:gaia,代码行数:32,代码来源:test_dialer_dsds_receive_call_on_both_sims.py

示例3: test_set_up_conference_call

# 需要导入模块: from gaiatest.apps.phone.regions.call_screen import CallScreen [as 别名]
# 或者: from gaiatest.apps.phone.regions.call_screen.CallScreen import hang_up [as 别名]
    def test_set_up_conference_call(self):
        """Set up a conference between the remote phone and Plivo."""

        test_phone_number = self.testvars['remote_phone_number']
        from gaiatest.utils.plivo.plivo_util import PlivoUtil

        self.plivo = PlivoUtil(
            self.testvars['plivo']['auth_id'],
            self.testvars['plivo']['auth_token'],
            self.testvars['plivo']['phone_number']
        )

        self.is_in_conference_call = False
        self.is_in_regular_call = False

        phone = Phone(self.marionette)
        phone.launch()

        call_screen = phone.keypad.call_number(test_phone_number)
        call_screen.wait_for_outgoing_call()
        self.is_in_regular_call = True
        call_screen.wait_for_condition(lambda m: self.data_layer.active_telephony_state == 'connected')

        self.call_uuid = self.plivo.make_call(
            to_number=self.testvars['local_phone_numbers'][0].replace('+', ''),
            timeout=PLIVO_TIMEOUT)

        call_screen = CallScreen(self.marionette)
        call_screen.wait_for_incoming_call_while_on_call()
        call_screen.answer_call_while_on_call()

        # Wait for Plivo to report the call as connected
        Wait(self.plivo, timeout=PLIVO_TIMEOUT).until(
            lambda p: p.is_call_connected(self.call_uuid),
            message='The call was not connected.')

        call_screen.merge_calls()
        self.is_in_regular_call = False
        self.is_in_conference_call = True
        self.assertEqual(call_screen.conference_label, 'Conference (2)')

        call_screen.hang_up()
        self.is_in_conference_call = False

        Wait(self.plivo, timeout=PLIVO_TIMEOUT).until(
            lambda p: p.is_call_completed(self.call_uuid),
            message="Plivo didn't report the call as completed")
        self.call_uuid = None
开发者ID:6a68,项目名称:gaia,代码行数:50,代码来源:test_dialer_set_up_conference_call.py

示例4: test_dsds_receive_call_on_both_sims

# 需要导入模块: from gaiatest.apps.phone.regions.call_screen import CallScreen [as 别名]
# 或者: from gaiatest.apps.phone.regions.call_screen.CallScreen import hang_up [as 别名]
    def test_dsds_receive_call_on_both_sims(self, sim_value, sim_name):
        """Make a phone call from Plivo to each SIM."""
        PLIVO_TIMEOUT = 30

        from gaiatest.utils.plivo.plivo_util import PlivoUtil
        self.plivo = PlivoUtil(
            self.testvars['plivo']['auth_id'],
            self.testvars['plivo']['auth_token'],
            self.testvars['plivo']['phone_number']
        )
        self.call_uuid = self.plivo.make_call(
            to_number=self.testvars['local_phone_numbers'][sim_value].replace('+', ''),
            timeout=PLIVO_TIMEOUT)

        call_screen = CallScreen(self.marionette)
        call_screen.wait_for_incoming_call()

        # TODO Replace the following line by a check on the l10n ID
        # once bug 1104667 lands
        self.assertTrue(sim_name in call_screen.incoming_via_sim)

        call_screen.answer_call()

        # Wait for Plivo to report the call as connected
        Wait(self.plivo, timeout=PLIVO_TIMEOUT).until(
            lambda p: p.is_call_connected(self.call_uuid),
            message='The call was not connected.')

        # Wait for the state to be connected
        call_screen.wait_for_condition(
            lambda m: self.data_layer.active_telephony_state == 'connected',
            timeout=30)

        # TODO Replace the following line by a check on the l10n ID
        # once bug 1104667 lands
        self.assertTrue(sim_name in call_screen.incoming_via_sim)

        call_screen.hang_up()

        Wait(self.plivo, timeout=PLIVO_TIMEOUT).until(
            lambda p: p.is_call_completed(self.call_uuid),
            message="Plivo didn't report the call as completed")
        self.call_uuid = None
开发者ID:AlexSJ,项目名称:gaia,代码行数:45,代码来源:test_dialer_dsds_receive_call_on_both_sims.py

示例5: test_set_up_conference_call

# 需要导入模块: from gaiatest.apps.phone.regions.call_screen import CallScreen [as 别名]
# 或者: from gaiatest.apps.phone.regions.call_screen.CallScreen import hang_up [as 别名]
    def test_set_up_conference_call(self):
        """Set up a conference between the remote phone and Plivo."""

        test_phone_number = self.testvars['remote_phone_number']
        from gaiatest.utils.plivo.plivo_util import PlivoUtil

        self.plivo = PlivoUtil(
            self.testvars['plivo']['auth_id'],
            self.testvars['plivo']['auth_token'],
            self.testvars['plivo']['phone_number']
        )

        self.is_in_conference_call = False
        self.is_in_regular_call = False

        phone = Phone(self.marionette)
        phone.launch()

        call_screen = phone.keypad.call_number(test_phone_number)
        call_screen.wait_for_outgoing_call()
        self.is_in_regular_call = True
        Wait(self.marionette).until(lambda m: self.data_layer.active_telephony_state == 'connected')

        self.call_uuid = self.plivo.make_call(
            to_number=self.environment.phone_numbers[0].replace('+', ''))
        call_screen = CallScreen(self.marionette)
        call_screen.wait_for_incoming_call_while_on_call()

        call_screen.answer_call_while_on_call()
        self.plivo.wait_for_call_connected(self.call_uuid)

        call_screen.merge_calls()
        self.is_in_regular_call = False
        self.is_in_conference_call = True
        self.assertEqual(call_screen.conference_label, 'Conference (2)')

        call_screen.hang_up()
        self.is_in_conference_call = False
        self.plivo.wait_for_call_completed(self.call_uuid)
        self.call_uuid = None
开发者ID:AaskaShah,项目名称:gaia,代码行数:42,代码来源:test_dialer_set_up_conference_call.py

示例6: test_receive_call

# 需要导入模块: from gaiatest.apps.phone.regions.call_screen import CallScreen [as 别名]
# 或者: from gaiatest.apps.phone.regions.call_screen.CallScreen import hang_up [as 别名]
    def test_receive_call(self):
        """Make a phone call from Plivo to the phone."""

        from gaiatest.utils.plivo.plivo_util import PlivoUtil
        self.plivo = PlivoUtil(
            self.testvars['plivo']['auth_id'],
            self.testvars['plivo']['auth_token'],
            self.testvars['plivo']['phone_number']
        )
        self.call_uuid = self.plivo.make_call(
            to_number=self.testvars['local_phone_numbers'][0].replace('+', ''))

        call_screen = CallScreen(self.marionette)
        call_screen.wait_for_incoming_call()

        call_screen.answer_call()
        self.plivo.wait_for_call_connected(self.call_uuid)
        Wait(self.marionette).until(lambda m: self.data_layer.active_telephony_state == 'connected')

        call_screen.hang_up()
        self.plivo.wait_for_call_completed(self.call_uuid)
        self.call_uuid = None
开发者ID:AutomatedTester,项目名称:gaia,代码行数:24,代码来源:test_dialer_receive_call.py

示例7: test_dsds_receive_call_on_both_sims

# 需要导入模块: from gaiatest.apps.phone.regions.call_screen import CallScreen [as 别名]
# 或者: from gaiatest.apps.phone.regions.call_screen.CallScreen import hang_up [as 别名]
    def test_dsds_receive_call_on_both_sims(self, sim_number):
        """Make a phone call from Plivo to each SIM."""

        from gaiatest.utils.plivo.plivo_util import PlivoUtil
        self.plivo = PlivoUtil(
            self.testvars['plivo']['auth_id'],
            self.testvars['plivo']['auth_token'],
            self.testvars['plivo']['phone_number']
        )
        self.call_uuid = self.plivo.make_call(
            to_number=self.environment.phone_numbers[sim_number - 1].replace('+', ''))

        call_screen = CallScreen(self.marionette)
        call_screen.wait_for_incoming_call()
        self.assertIn(str(sim_number), call_screen.via_sim)

        call_screen.answer_call()
        self.plivo.wait_for_call_connected(self.call_uuid)
        Wait(self.marionette).until(lambda m: self.data_layer.active_telephony_state == 'connected')
        self.assertIn(str(sim_number), call_screen.via_sim)

        call_screen.hang_up()
        self.plivo.wait_for_call_completed(self.call_uuid)
        self.call_uuid = None
开发者ID:Cwiiis,项目名称:gaia,代码行数:26,代码来源:test_dialer_dsds_receive_call_on_both_sims.py


注:本文中的gaiatest.apps.phone.regions.call_screen.CallScreen.hang_up方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。