class TestDistroUbuntu(unittest.TestCase): def setUp(self): self.distro = Ubuntu() def test_icon_download_url(self): mock_cache = MockCache("http://ppa.launchpad.net/mvo/ppa/ubuntu") pkgname = "pkg" iconname = "iconfilename" pkg_uri = mock_cache[pkgname].candidate.uri icon_url = self.distro.get_downloadable_icon_url(pkg_uri, iconname) self.assertEqual(icon_url, "http://ppa.launchpad.net/mvo/meta/ppa/iconfilename")
def setUp(self): self.distro = Ubuntu()
def setUp(self): import lsb_release self.distro = Ubuntu(lsb_release.get_distro_information())