mirror of
https://git.deluge-torrent.org/deluge
synced 2025-09-04 09:05:35 +00:00
[Tests] Fixes in test_tracker_icons.py
* Removed publicbt.org test as server is down * Replaced ubuntu.ico with ubuntu.png to make the test pass
This commit is contained in:
parent
9d662bf059
commit
bb5f20e3de
3 changed files with 4 additions and 8 deletions
|
@ -1,5 +1,7 @@
|
|||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
import deluge.component as component
|
||||
import deluge.ui.tracker_icons
|
||||
from deluge.ui.tracker_icons import TrackerIcon, TrackerIcons
|
||||
|
@ -13,6 +15,7 @@ deluge.ui.tracker_icons.PIL_INSTALLED = False
|
|||
common.disable_new_release_check()
|
||||
|
||||
|
||||
@pytest.mark.internet
|
||||
class TrackerIconsTestCase(BaseTestCase):
|
||||
|
||||
def set_up(self):
|
||||
|
@ -48,7 +51,7 @@ class TrackerIconsTestCase(BaseTestCase):
|
|||
|
||||
def test_get_ubuntu_ico(self):
|
||||
# ubuntu.com has inline css which causes HTMLParser issues
|
||||
icon = TrackerIcon(os.path.join(dirname, "ubuntu.ico"))
|
||||
icon = TrackerIcon(os.path.join(dirname, "ubuntu.png"))
|
||||
d = self.icons.fetch("www.ubuntu.com")
|
||||
d.addCallback(self.assertNotIdentical, None)
|
||||
d.addCallback(self.assertEquals, icon)
|
||||
|
@ -62,13 +65,6 @@ class TrackerIconsTestCase(BaseTestCase):
|
|||
d.addCallback(self.assertEquals, icon)
|
||||
return d
|
||||
|
||||
def test_get_publicbt_ico(self):
|
||||
icon = TrackerIcon(os.path.join(dirname, "publicbt.ico"))
|
||||
d = self.icons.fetch("publicbt.org")
|
||||
d.addCallback(self.assertNotIdentical, None)
|
||||
d.addCallback(self.assertEquals, icon)
|
||||
return d
|
||||
|
||||
def test_get_empty_string_tracker(self):
|
||||
d = self.icons.fetch("")
|
||||
d.addCallback(self.assertIdentical, None)
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
BIN
deluge/tests/ubuntu.png
Normal file
BIN
deluge/tests/ubuntu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Loading…
Add table
Add a link
Reference in a new issue