Exemplo n.º 1
0
class TestCodecSearch(unittest.TestCase):
    def setUp(self):
        options = FakeOptions()
        args = [
            'gstreamer|0.10|<unknown>|MPEG-1 Layer 3 (MP3) decoder|'
            'decoder-audio/mpeg, mpegversion=(int)1, layer=(int)3'
        ]
        #args = ['gstreamer|0.10|<unknown>|Flash Video decoder|'
        #       'decoder-video/x-flash-video, flvversion=(int)1']
        style = CodecSearchActivationStyle(options, args)
        style.isInstallerOnly = False
        style._parseArgs()
        self.app = AppInstall(options, style)

    def testHasItems(self):
        model = self.app.menu.treeview_packages.get_model()
        self.assert_(len(model) > 0, "no codecs found")

    def testRun(self):
        gobject.timeout_add(100, gtk.main_quit)
        self.app.run()

    def tearDown(self):
        self.app.window_main.destroy()
        del (self.app)
class TestAppInstall(unittest.TestCase):
    def setUp(self):
        options = FakeOptions()
        style = ActivationStyle()
        style.preRun()
        self.app = App(options, style)
    def testRun(self):
        gobject.timeout_add(100, gtk.main_quit)
        self.app.run()
    def tearDown(self):
        self.app.window_main.destroy()
        del(self.app)
Exemplo n.º 3
0
class TestAppInstall(unittest.TestCase):
    def setUp(self):
        options = FakeOptions()
        style = ActivationStyle()
        style.preRun()
        self.app = App(options, style)

    def testRun(self):
        gobject.timeout_add(100, gtk.main_quit)
        self.app.run()

    def tearDown(self):
        self.app.window_main.destroy()
        del (self.app)
class TestMimeSearch(unittest.TestCase):
    def setUp(self):
        options = FakeOptions()
        uri = "file:/etc/fstab"
        style = MimeSearchActivationStyle(options, uri, uri)
        style.isInstallerOnly = False
        style.preRun()
        self.app = AppInstall(options, style)

    def testHasItems(self):
       self.assert_(len(self.app.menu.treeview_packages.get_model()) > 0,
                     "no mime-data found")

    def testRun(self):
        gobject.timeout_add(100, gtk.main_quit)
        self.app.run()

    def tearDown(self):
        self.app.window_main.destroy()
        del(self.app)
Exemplo n.º 5
0
class TestMimeSearch(unittest.TestCase):
    def setUp(self):
        options = FakeOptions()
        uri = "file:/etc/fstab"
        style = MimeSearchActivationStyle(options, uri, uri)
        style.isInstallerOnly = False
        style.preRun()
        self.app = AppInstall(options, style)

    def testHasItems(self):
        self.assert_(
            len(self.app.menu.treeview_packages.get_model()) > 0,
            "no mime-data found")

    def testRun(self):
        gobject.timeout_add(100, gtk.main_quit)
        self.app.run()

    def tearDown(self):
        self.app.window_main.destroy()
        del (self.app)
class TestCodecSearch(unittest.TestCase):
    def setUp(self):
        options = FakeOptions()
        args = ['gstreamer|0.10|<unknown>|MPEG-1 Layer 3 (MP3) decoder|'
                'decoder-audio/mpeg, mpegversion=(int)1, layer=(int)3']
        #args = ['gstreamer|0.10|<unknown>|Flash Video decoder|'
        #       'decoder-video/x-flash-video, flvversion=(int)1']
        style = CodecSearchActivationStyle(options, args)
        style.isInstallerOnly = False
        style._parseArgs()
        self.app = AppInstall(options, style)

    def testHasItems(self):
        model = self.app.menu.treeview_packages.get_model()
        self.assert_(len(model) > 0,
                     "no codecs found")

    def testRun(self):
        gobject.timeout_add(100, gtk.main_quit)
        self.app.run()

    def tearDown(self):
        self.app.window_main.destroy()
        del(self.app)