Ejemplo n.º 1
0
    def testReplaceReferencebrowser(self):
        self.setRoles(['Manager'])
        skins_tool = getToolByName(self.portal, 'portal_skins')
        sels = skins_tool._getSelections()
        for skinname, layer in sels.items():
            layers = layer.split(',')
            self.assertFalse('ATReferenceBrowserWidget' in layers)
            layers.remove('referencebrowser')
            new_layers = ','.join(layers)
            sels[skinname] = new_layers

        loadMigrationProfile(self.portal, self.profile)
        setupReferencebrowser(self.portal)

        sels = skins_tool._getSelections()
        for skinname, layer in sels.items():
            layers = layer.split(',')
            self.assertTrue('referencebrowser' in layers)
Ejemplo n.º 2
0
    def testReplaceReferencebrowser(self):
        self.setRoles(['Manager'])
        skins_tool = getToolByName(self.portal, 'portal_skins')
        sels = skins_tool._getSelections()
        for skinname, layer in sels.items():
            layers = layer.split(',')
            self.failIf('ATReferenceBrowserWidget' in layers)
            layers.remove('referencebrowser')
            new_layers = ','.join(layers)
            sels[skinname] = new_layers

        loadMigrationProfile(self.portal, self.profile)
        setupReferencebrowser(self.portal)

        sels = skins_tool._getSelections()
        for skinname, layer in sels.items():
            layers = layer.split(',')
            self.failUnless('referencebrowser' in layers)
Ejemplo n.º 3
0
    def testReplaceReferencebrowser(self):
        self.setRoles(['Manager'])
        skins_tool = getToolByName(self.portal, 'portal_skins')
        if 'referencebrowser' not in skins_tool:
            return
        sels = skins_tool._getSelections()
        for skinname, layer in sels.items():
            layers = layer.split(',')
            self.assertFalse('ATReferenceBrowserWidget' in layers)
            layers.remove('referencebrowser')
            new_layers = ','.join(layers)
            sels[skinname] = new_layers

        from .alphas import threeX_alpha1
        threeX_alpha1(self.portal)
        setupReferencebrowser(self.portal)

        sels = skins_tool._getSelections()
        for skinname, layer in sels.items():
            layers = layer.split(',')
            self.assertTrue('referencebrowser' in layers)
Ejemplo n.º 4
0
    def testReplaceReferencebrowser(self):
        self.setRoles(['Manager'])
        skins_tool = getToolByName(self.portal, 'portal_skins')
        if 'referencebrowser' not in skins_tool:
            return
        sels = skins_tool._getSelections()
        for skinname, layer in sels.items():
            layers = layer.split(',')
            self.assertFalse('ATReferenceBrowserWidget' in layers)
            layers.remove('referencebrowser')
            new_layers = ','.join(layers)
            sels[skinname] = new_layers

        from .alphas import threeX_alpha1
        threeX_alpha1(self.portal)
        setupReferencebrowser(self.portal)

        sels = skins_tool._getSelections()
        for skinname, layer in sels.items():
            layers = layer.split(',')
            self.assertTrue('referencebrowser' in layers)