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_getting_values(self): registry = getUtility(IRegistry) tmce = getUtility(ITinyMCE) adapter = ITinyMCELibrariesExtended(tmce) self.assert_(adapter.imagebrowser_resources == u"") registry[REGISTRY_KEY] = [u"id"] self.assert_(adapter.imagebrowser_resources == u"id")
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"])
def test_tinymce_adapter_interface(self): tmce = getUtility(ITinyMCE) adapter = ITinyMCELibrariesExtended(tmce) self.assert_(ITinyMCELibrariesExtended.providedBy(adapter)) self.assert_(verifyObject(ITinyMCELibrariesExtended, adapter))