Exemplo n.º 1
0
    def test_install_from_manifest(self):

        temp_manifest = addon_stubs.generate_manifest()
        m = ManifestParser()
        m.read(temp_manifest)
        addons = m.get()
        # Obtain details of addons to install from the manifest
        addons_to_install = [self.am.addon_details(x['path'])['id'] for x in addons]

        self.am.install_from_manifest(temp_manifest)
        # Generate a list of addons installed in the profile
        addons_installed = [unicode(x[:-len('.xpi')]) for x in os.listdir(os.path.join(
                            self.profile.profile, 'extensions', 'staged'))]
        self.assertEqual(addons_installed.sort(), addons_to_install.sort())
        # Cleanup the temporary addon and manifest directories
        mozfile.rmtree(os.path.dirname(temp_manifest))
Exemplo n.º 2
0
    def test_install_from_manifest(self):

        temp_manifest = addon_stubs.generate_manifest()
        m = ManifestParser()
        m.read(temp_manifest)
        addons = m.get()
        # Obtain details of addons to install from the manifest
        addons_to_install = [self.am.addon_details(x['path'])['id'] for x in addons]

        self.am.install_from_manifest(temp_manifest)
        # Generate a list of addons installed in the profile
        addons_installed = [unicode(x[:-len('.xpi')]) for x in os.listdir(os.path.join(
                            self.profile.profile, 'extensions', 'staged'))]
        self.assertEqual(addons_installed.sort(), addons_to_install.sort())
        # Cleanup the temporary addon and manifest directories
        mozfile.rmtree(os.path.dirname(temp_manifest))