コード例 #1
0
ファイル: test_apps.py プロジェクト: AndreiH/mcom-tests
 def test_showcased_apps_link_urls_are_valid(self, mozwebqa):
     apps_page = Apps(mozwebqa)
     apps_page.go_to_page()
     bad_urls = []
     for link in apps_page.showcased_apps_links:
         url = link.get_attribute('href')
         response_code = apps_page.get_response_code(url)
         if response_code != requests.codes.ok:
             bad_urls.append('%s is not a valid url - status code: %s.' % (url, response_code))
     Assert.equal(0, len(bad_urls), '%s bad urls found: ' % len(bad_urls) + ', '.join(bad_urls))
コード例 #2
0
ファイル: test_apps.py プロジェクト: AndreiH/mcom-tests
 def test_page_link_urls_are_valid(self, mozwebqa):
     apps_page = Apps(mozwebqa)
     apps_page.go_to_page()
     bad_urls = []
     for link in apps_page.page_links_list:
         url = apps_page.link_destination(link.get('locator'))
         response_code = apps_page.get_response_code(url)
         if response_code != requests.codes.ok:
             bad_urls.append('%s is not a valid url - status code: %s.' % (url, response_code))
     Assert.equal(0, len(bad_urls), '%s bad urls found: ' % len(bad_urls) + ', '.join(bad_urls))
コード例 #3
0
ファイル: test_apps.py プロジェクト: MadhavanS/mcom-tests
 def test_showcased_apps_link_urls_are_valid(self, mozwebqa):
     apps_page = Apps(mozwebqa)
     apps_page.go_to_page()
     bad_urls = []
     for link in apps_page.showcased_apps_links:
         url = link.get_attribute('href')
         response_code = apps_page.get_response_code(url)
         if response_code != requests.codes.ok:
             bad_urls.append('%s is not a valid url - status code: %s.' %
                             (url, response_code))
     Assert.equal(
         0, len(bad_urls),
         '%s bad urls found: ' % len(bad_urls) + ', '.join(bad_urls))
コード例 #4
0
ファイル: test_apps.py プロジェクト: MadhavanS/mcom-tests
 def test_page_link_urls_are_valid(self, mozwebqa):
     apps_page = Apps(mozwebqa)
     apps_page.go_to_page()
     bad_urls = []
     for link in apps_page.page_links_list:
         url = apps_page.link_destination(link.get('locator'))
         response_code = apps_page.get_response_code(url)
         if response_code != requests.codes.ok:
             bad_urls.append('%s is not a valid url - status code: %s.' %
                             (url, response_code))
     Assert.equal(
         0, len(bad_urls),
         '%s bad urls found: ' % len(bad_urls) + ', '.join(bad_urls))