def to1beta4(context): tmce = getUtility(ITinyMCE) adapter = ITinyMCELibrariesExtended(tmce) if hasattr(tmce, "_imagebrowser_ressources"): resources_old = tmce._imagebrowser_ressources adapter.imagebrowser_resources = resources_old delattr(tmce, "_imagebrowser_ressources")
def test_tinymce_adapter_setting_values(self): registry = getUtility(IRegistry) tmce = getUtility(ITinyMCE) adapter = ITinyMCELibrariesExtended(tmce) adapter.imagebrowser_resources = u"id2\nid3" self.assert_(registry[REGISTRY_KEY] == [u"id2", u"id3"])