Exemple #1
0
 def test_get_openbt_png(self):
     # openbittorrent.com has an incorrect type (image/gif)
     icon = TrackerIcon(os.path.join(dirname, "openbt.png"))
     d = icons.get("openbittorrent.com")
     d.addCallback(self.assertNotIdentical, None)
     d.addCallback(self.assertEquals, icon)
     return d
Exemple #2
0
 def test_get_seo_ico_with_sni(self):
     # seo using certificates with SNI support only
     icon = TrackerIcon(common.get_test_data_file('seo.ico'))
     d = self.icons.fetch('www.seo.com')
     d.addCallback(self.assertNotIdentical, None)
     d.addCallback(self.assertEqual, icon)
     return d
Exemple #3
0
 def test_get_google_ico_with_redirect(self):
     # google.com redirects to www.google.com
     icon = TrackerIcon(os.path.join(dirname, "google.ico"))
     d = icons.get("google.com")
     d.addCallback(self.assertNotIdentical, None)
     d.addCallback(self.assertEquals, icon)
     return d
Exemple #4
0
 def test_get_deluge_png(self):
     # Deluge has a png favicon link
     icon = TrackerIcon(os.path.join(dirname, "deluge.png"))
     d = icons.get("deluge-torrent.org")
     d.addCallback(self.assertNotIdentical, None)
     d.addCallback(self.assertEquals, icon)
     return d
Exemple #5
0
 def test_get_google_ico_with_redirect(self):
     # google.com redirects to www.google.com
     icon = TrackerIcon(common.get_test_data_file('google.ico'))
     d = self.icons.fetch('google.com')
     d.addCallback(self.assertNotIdentical, None)
     d.addCallback(self.assertEqual, icon)
     return d
Exemple #6
0
 def test_get_deluge_png(self):
     # Deluge has a png favicon link
     icon = TrackerIcon(common.get_test_data_file('deluge.png'))
     d = self.icons.fetch('deluge-torrent.org')
     d.addCallback(self.assertNotIdentical, None)
     d.addCallback(self.assertEqual, icon)
     return d
 def test_get_ubuntu_ico(self):
     # ubuntu.com has inline css which causes HTMLParser issues
     icon = TrackerIcon(os.path.join(dirname, "ubuntu.ico"))
     d = icons.get("www.ubuntu.com")
     d.addCallback(self.assertNotIdentical, None)
     d.addCallback(self.assertEquals, icon)
     return d
Exemple #8
0
 def test_get_google_ico(self):
     # Google doesn't have any icon links
     # So instead we'll grab its favicon.ico
     icon = TrackerIcon(os.path.join(dirname, "google.ico"))
     d = icons.get("www.google.com")
     d.addCallback(self.assertNotIdentical, None)
     d.addCallback(self.assertEquals, icon)
     return d
Exemple #9
0
 def test_get_google_ico(self):
     # Google doesn't have any icon links
     # So instead we'll grab its favicon.ico
     icon = TrackerIcon(common.get_test_data_file('google.ico'))
     d = self.icons.fetch('www.google.com')
     d.addCallback(self.assertNotIdentical, None)
     d.addCallback(self.assertEqual, icon)
     return d
Exemple #10
0
 def test_get_publicbt_ico(self):
     icon = TrackerIcon(os.path.join(dirname, "publicbt.ico"))
     d = icons.get("publicbt.org")
     d.addCallback(self.assertNotIdentical, None)
     d.addCallback(self.assertEquals, icon)
     return d
 def test_get_publicbt_ico(self):
     icon = TrackerIcon("../publicbt.ico")
     d = icons.get("publicbt.org")
     d.addCallback(self.assertNotIdentical, None)
     d.addCallback(self.assertEquals, icon)
     return d