コード例 #1
0
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")
コード例 #2
0
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")
コード例 #3
0
 def setUp(self):
     self.distro = Ubuntu()
コード例 #4
0
 def setUp(self):
     import lsb_release
     self.distro = Ubuntu(lsb_release.get_distro_information())
コード例 #5
0
 def setUp(self):
     self.distro = Ubuntu()
コード例 #6
0
 def setUp(self):
     import lsb_release
     self.distro = Ubuntu(lsb_release.get_distro_information())