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


Python addons_api.AddonsAPI类代码示例

本文整理汇总了Python中pages.desktop.addons_api.AddonsAPI的典型用法代码示例。如果您正苦于以下问题:Python AddonsAPI类的具体用法?Python AddonsAPI怎么用?Python AddonsAPI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: test_that_compatible_applications_equal

    def test_that_compatible_applications_equal(self, mozwebqa):

        # browser
        firebug_page = Details(mozwebqa, self.firebug)
        firebug_page.expand_version_information()
        browser_compatible_applications = firebug_page.compatible_applications

        # api
        addons_xml = AddonsAPI(mozwebqa, self.firebug)
        xml_compatible_applications = addons_xml.get_compatible_applications()
        name = xml_compatible_applications[0]
        min_version = xml_compatible_applications[1]
        max_version = xml_compatible_applications[2]

        # E.g.: Works with Firefox 1.0
        meta_compat_prefix = 'Works with %s %s ' % (name, min_version)
        # E.g.: Works with Firefox 1.0 and later
        meta_compat_abbrev = meta_compat_prefix + 'and later'
        # E.g.: Works with Firefox 1.0 - 16.0a1
        meta_compat_full = "%s- %s" % (meta_compat_prefix, max_version)

        assert (browser_compatible_applications == meta_compat_full or
                browser_compatible_applications == meta_compat_abbrev or
                browser_compatible_applications.startswith(meta_compat_prefix)
                ), "Listed compat. versions don't match versions listed in API."
开发者ID:GorillaTester,项目名称:Addon-Tests,代码行数:25,代码来源:test_details_page_against_xml.py

示例2: test_that_firebug_summary_is_correct

    def test_that_firebug_summary_is_correct(self, mozwebqa):
        # browser
        firebug_page = Details(mozwebqa, self.firebug)
        browser_summary = firebug_page.summary

        # api
        addons_xml = AddonsAPI(mozwebqa, self.firebug)
        xml_summary = addons_xml.get_addon_summary()

        assert xml_summary == browser_summary
开发者ID:adini121,项目名称:Addon-Tests,代码行数:10,代码来源:test_details_page_against_xml.py

示例3: test_that_daily_users_in_api_equals_daily_users_in_details_page

    def test_that_daily_users_in_api_equals_daily_users_in_details_page(self, mozwebqa):
        # browser
        firebug_page = Details(mozwebqa, self.firebug)
        browser_daily_users = firebug_page.daily_users_number

        # api
        addons_xml = AddonsAPI(mozwebqa, self.firebug)
        xml_daily_users = addons_xml.get_daily_users()

        assert browser_daily_users == xml_daily_users
开发者ID:adini121,项目名称:Addon-Tests,代码行数:10,代码来源:test_details_page_against_xml.py

示例4: test_that_reviews_in_api_equals_reviews_in_details_page

    def test_that_reviews_in_api_equals_reviews_in_details_page(self, mozwebqa):
        # browser
        firebug_page = Details(mozwebqa, self.firebug)
        browser_reviews = firebug_page.total_reviews_count

        # api
        addons_xml = AddonsAPI(mozwebqa, self.firebug)
        xml_reviews = addons_xml.get_reviews_count()

        assert browser_reviews == xml_reviews
开发者ID:adini121,项目名称:Addon-Tests,代码行数:10,代码来源:test_details_page_against_xml.py

示例5: test_that_icon_is_correct

    def test_that_icon_is_correct(self, mozwebqa):
        # browser
        firebug_page = Details(mozwebqa, self.firebug)
        browser_icon = firebug_page.icon_url

        # api
        addons_xml = AddonsAPI(mozwebqa, self.firebug)
        xml_icon = addons_xml.get_icon_url()

        assert browser_icon == xml_icon
开发者ID:adini121,项目名称:Addon-Tests,代码行数:10,代码来源:test_details_page_against_xml.py

示例6: test_that_icon_is_correct

    def test_that_icon_is_correct(self, base_url, selenium):
        # browser
        firebug_page = Details(base_url, selenium, self.firebug)
        browser_icon = firebug_page.icon_url

        # api
        addons_xml = AddonsAPI(base_url, self.firebug)
        xml_icon = addons_xml.get_icon_url()

        assert browser_icon == xml_icon
开发者ID:Ruwan-Ranganath,项目名称:Addon-Tests,代码行数:10,代码来源:test_details_page_against_xml.py

示例7: test_that_support_url_is_correct

    def test_that_support_url_is_correct(self, mozwebqa):
        # browser
        firebug_page = Details(mozwebqa, self.firebug)
        browser_support_url = firebug_page.support_url

        # api
        addons_xml = AddonsAPI(mozwebqa, self.firebug)
        xml_support_url = addons_xml.get_support_url()

        assert browser_support_url == xml_support_url
开发者ID:adini121,项目名称:Addon-Tests,代码行数:10,代码来源:test_details_page_against_xml.py

示例8: test_that_firebug_summary_is_correct

    def test_that_firebug_summary_is_correct(self, base_url, selenium):
        # browser
        firebug_page = Details(base_url, selenium, self.firebug)
        browser_summary = firebug_page.summary

        # api
        addons_xml = AddonsAPI(base_url, self.firebug)
        xml_summary = addons_xml.get_addon_summary()

        assert xml_summary == browser_summary
开发者ID:Ruwan-Ranganath,项目名称:Addon-Tests,代码行数:10,代码来源:test_details_page_against_xml.py

示例9: test_that_learn_more_link_is_correct

    def test_that_learn_more_link_is_correct(self, base_url, selenium):
        # api
        addons_xml = AddonsAPI(base_url, self.firebug)
        learn_more_url = addons_xml.get_learn_more_url()

        # browser
        details_page = Details(base_url, selenium, self.firebug)
        details_page.get_url(learn_more_url)

        assert self.firebug in details_page.page_title
开发者ID:Ruwan-Ranganath,项目名称:Addon-Tests,代码行数:10,代码来源:test_details_page_against_xml.py

示例10: test_that_rating_in_api_equals_rating_in_details_page

    def test_that_rating_in_api_equals_rating_in_details_page(self, mozwebqa):
        # browser
        firebug_page = Details(mozwebqa, self.firebug)
        browser_rating = firebug_page.rating

        # api
        addons_xml = AddonsAPI(mozwebqa, self.firebug)
        xml_rating = addons_xml.get_rating()

        assert browser_rating == xml_rating
开发者ID:adini121,项目名称:Addon-Tests,代码行数:10,代码来源:test_details_page_against_xml.py

示例11: test_that_rating_in_api_equals_rating_in_details_page

    def test_that_rating_in_api_equals_rating_in_details_page(self, base_url, selenium):
        # browser
        firebug_page = Details(base_url, selenium, self.firebug)
        browser_rating = firebug_page.rating

        # api
        addons_xml = AddonsAPI(base_url, self.firebug)
        xml_rating = addons_xml.get_rating()

        assert browser_rating == xml_rating
开发者ID:Ruwan-Ranganath,项目名称:Addon-Tests,代码行数:10,代码来源:test_details_page_against_xml.py

示例12: test_that_home_page_in_api_equals_home_page_in_details_page

    def test_that_home_page_in_api_equals_home_page_in_details_page(self, base_url, selenium):
        # browser
        firebug_page = Details(base_url, selenium, self.firebug)
        browser_home_page = urlparse.unquote(firebug_page.website)

        # api
        addons_xml = AddonsAPI(base_url, self.firebug)
        xml_home_page = addons_xml.get_home_page()

        assert xml_home_page in browser_home_page
开发者ID:Ruwan-Ranganath,项目名称:Addon-Tests,代码行数:10,代码来源:test_details_page_against_xml.py

示例13: test_that_description_text_is_correct

    def test_that_description_text_is_correct(self, base_url, selenium):
        # browser
        firebug_page = Details(base_url, selenium, self.firebug)
        browser_description = firebug_page.description

        # api
        addons_xml = AddonsAPI(base_url, self.firebug)
        xml_description = addons_xml.get_addon_description()

        assert browser_description.replace('\n', '') == xml_description.replace('\n', '')
开发者ID:Ruwan-Ranganath,项目名称:Addon-Tests,代码行数:10,代码来源:test_details_page_against_xml.py

示例14: test_that_reviews_in_api_equals_reviews_in_details_page

    def test_that_reviews_in_api_equals_reviews_in_details_page(self, base_url, selenium):
        # browser
        firebug_page = Details(base_url, selenium, self.firebug)
        browser_reviews = firebug_page.total_reviews_count

        # api
        addons_xml = AddonsAPI(base_url, self.firebug)
        xml_reviews = addons_xml.get_reviews_count()

        assert browser_reviews == xml_reviews
开发者ID:Ruwan-Ranganath,项目名称:Addon-Tests,代码行数:10,代码来源:test_details_page_against_xml.py

示例15: test_that_daily_users_in_api_equals_daily_users_in_details_page

    def test_that_daily_users_in_api_equals_daily_users_in_details_page(self, base_url, selenium):
        # browser
        firebug_page = Details(base_url, selenium, self.firebug)
        browser_daily_users = firebug_page.daily_users_number

        # api
        addons_xml = AddonsAPI(base_url, self.firebug)
        xml_daily_users = addons_xml.get_daily_users()

        assert browser_daily_users == xml_daily_users
开发者ID:Ruwan-Ranganath,项目名称:Addon-Tests,代码行数:10,代码来源:test_details_page_against_xml.py


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