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


Python CostControl.disable_mobile_data_tracking方法代码示例

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


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

示例1: test_cost_control_reset_wifi

# 需要导入模块: from gaiatest.apps.cost_control.app import CostControl [as 别名]
# 或者: from gaiatest.apps.cost_control.app.CostControl import disable_mobile_data_tracking [as 别名]
    def test_cost_control_reset_wifi(self):

        self.data_layer.connect_to_wifi()

        cost_control = CostControl(self.marionette)
        cost_control.launch()

        cost_control.switch_to_ftu()
        cost_control.run_ftu_accepting_defaults()

        cost_control.disable_mobile_data_tracking()
        cost_control.enable_wifi_data_tracking()

        # If we don't kill the app manually it might get killed by the oom process.
        # In that case when we re-launch the app it has a hash attached at the end of the src. - Bug 1091676
        self.apps.kill(cost_control.app)

        # open browser to get some data downloaded
        search = Search(self.marionette)
        search.launch()
        search.go_to_url(self.marionette.absolute_url('mozilla.html'))

        self.data_layer.disable_wifi()
        time.sleep(5)

        cost_control.launch()
        # if we can't trigger any data usage, there must be something wrong
        self.assertNotEqual(cost_control.wifi_data_usage_figure, u'0.00 B', 'No data usage shown after browsing.')

        settings = cost_control.tap_settings()
        settings.reset_wifi_usage()
        settings.tap_done()

        # wait for usage to be refreshed
        self.wait_for_condition(
            lambda m: cost_control.wifi_data_usage_figure == u'0.00 B',
            message='Wifi usage did not reset back to 0.00 B')
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:39,代码来源:test_cost_control_reset_wifi.py


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