コード例 #1
0
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")
コード例 #2
0
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")
コード例 #3
0
 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")
コード例 #4
0
 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"])
コード例 #5
0
 def test_tinymce_adapter_interface(self):
     tmce = getUtility(ITinyMCE)
     adapter = ITinyMCELibrariesExtended(tmce)
     self.assert_(ITinyMCELibrariesExtended.providedBy(adapter))
     self.assert_(verifyObject(ITinyMCELibrariesExtended, adapter))
コード例 #6
0
 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"])
コード例 #7
0
 def test_tinymce_adapter_interface(self):
     tmce = getUtility(ITinyMCE)
     adapter = ITinyMCELibrariesExtended(tmce)
     self.assert_(ITinyMCELibrariesExtended.providedBy(adapter))
     self.assert_(verifyObject(ITinyMCELibrariesExtended, adapter))