Пример #1
0
 def testInstallNewDependencies(self):
     from plone.app.upgrade.v40.alphas import threeX_alpha1
     self.setRoles(['Manager'])
     # test for running the TinyMCE profile by checking for the skin layer
     # it installs (the profile is marked as noninstallable, so we can't
     # ask the quick installer)
     skins_tool = getToolByName(self.portal, 'portal_skins')
     if 'tinymce' not in skins_tool:
         # Skip test in new Plones that don't have tinymce to begin with
         return
     del skins_tool['tinymce']
     for i in range(2):
         threeX_alpha1(self.portal)
         self.assertTrue('tinymce' in skins_tool)
         # sleep to avoid a GS log filename collision :-o
         time.sleep(1)
Пример #2
0
 def testInstallNewDependencies(self):
     from plone.app.upgrade.v40.alphas import threeX_alpha1
     self.setRoles(['Manager'])
     # test for running the TinyMCE profile by checking for the skin layer
     # it installs (the profile is marked as noninstallable, so we can't
     # ask the quick installer)
     skins_tool = getToolByName(self.portal, 'portal_skins')
     if 'tinymce' not in skins_tool:
         # Skip test in new Plones that don't have tinymce to begin with
         return
     del skins_tool['tinymce']
     for i in range(2):
         threeX_alpha1(self.portal)
         self.assertTrue('tinymce' in skins_tool)
         # sleep to avoid a GS log filename collision :-o
         time.sleep(1)
Пример #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)
Пример #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)