diff --git a/tests/test_core.py b/tests/test_core.py index 7bedef453..748b9f673 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -61,7 +61,7 @@ class CoreTestCase(unittest.TestCase): d.addCallbacks(self.fail, self.assertIsInstance, errbackArgs=(Failure,)) d = self.core.add_torrent_url(url, options, headers) - d.addCallback(self.assertEquals, info_hash) + d.addCallbacks(self.assertEquals, self.fail, callbackArgs=(info_hash,)) return d diff --git a/tests/test_tracker_icons.py b/tests/test_tracker_icons.py index 5ff7241e6..8732ad56e 100644 --- a/tests/test_tracker_icons.py +++ b/tests/test_tracker_icons.py @@ -1,10 +1,6 @@ from twisted.trial import unittest from deluge.ui.tracker_icons import TrackerIcons, TrackerIcon -from deluge.log import setupLogger - -# Must come before import common -setupLogger("debug", "debug.log") import common @@ -38,11 +34,16 @@ class TrackerIconsTestCase(unittest.TestCase): return d def test_get_ubuntu_ico(self): + def check_data(icon, data): + self.assertNotEqual(icon.get_data(), data) + # ubuntu.com has inline css which causes HTMLParser issues - icon = TrackerIcon("../ubuntu.png") d = icons.get("www.ubuntu.com") d.addCallback(self.assertNotIdentical, None) - d.addCallback(self.assertEquals, icon) + # as ubuntu's icon is 32x32 it may get resized and hence + # we can't test if the icon is equal to a reference one + # however we can test that the icon has some sort of data + d.addCallback(check_data, "") return d def test_get_openbt_png(self): diff --git a/tests/ubuntu.png b/tests/ubuntu.png deleted file mode 100644 index 7353cfbd4..000000000 Binary files a/tests/ubuntu.png and /dev/null differ