make basic tests (in Zope 3) run again
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3614 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
ece6b518aa
commit
b7e1d775ee
3 changed files with 10 additions and 4 deletions
|
@ -38,6 +38,9 @@ class WikiManager(BaseConfiguration):
|
||||||
|
|
||||||
implements(IWikiManager)
|
implements(IWikiManager)
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.setup()
|
||||||
|
|
||||||
def setup(self):
|
def setup(self):
|
||||||
self.wikis = {}
|
self.wikis = {}
|
||||||
self.plugins = {}
|
self.plugins = {}
|
||||||
|
@ -58,7 +61,7 @@ class WikiManager(BaseConfiguration):
|
||||||
def listWikis(self):
|
def listWikis(self):
|
||||||
return self.wikis.values()
|
return self.wikis.values()
|
||||||
|
|
||||||
def getPlugin(self, type, name=None):
|
def getPlugin(self, type, name=''):
|
||||||
plugins = self.getPlugins()
|
plugins = self.getPlugins()
|
||||||
if (type, name) in plugins:
|
if (type, name) in plugins:
|
||||||
plugin = plugins[(type, name)]
|
plugin = plugins[(type, name)]
|
||||||
|
@ -105,7 +108,7 @@ class Wiki(BaseConfiguration):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.title = title or name
|
self.title = title or name
|
||||||
self.pages = {}
|
self.pages = {}
|
||||||
self.setup()
|
#self.setup()
|
||||||
|
|
||||||
def setup(self):
|
def setup(self):
|
||||||
self.getManager().addWiki(self)
|
self.getManager().addWiki(self)
|
||||||
|
|
|
@ -22,7 +22,10 @@ Wiki implementation = adapters for Zope2 content objects.
|
||||||
$Id$
|
$Id$
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
try:
|
||||||
from Acquisition import aq_inner, aq_parent
|
from Acquisition import aq_inner, aq_parent
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
from BTrees.IOBTree import IOTreeSet
|
from BTrees.IOBTree import IOTreeSet
|
||||||
from BTrees.OOBTree import OOBTree
|
from BTrees.OOBTree import OOBTree
|
||||||
from persistent.mapping import PersistentMapping
|
from persistent.mapping import PersistentMapping
|
||||||
|
|
|
@ -53,7 +53,7 @@ class Test(unittest.TestCase):
|
||||||
def setUp(testCase):
|
def setUp(testCase):
|
||||||
component.provideAdapter(WikiURL, (IWiki, IBrowserRequest), IAbsoluteURL)
|
component.provideAdapter(WikiURL, (IWiki, IBrowserRequest), IAbsoluteURL)
|
||||||
component.provideAdapter(PageURL, (IWikiPage, IBrowserRequest), IAbsoluteURL)
|
component.provideAdapter(PageURL, (IWikiPage, IBrowserRequest), IAbsoluteURL)
|
||||||
#component.provideUtility(IntIdsStub())
|
component.provideUtility(IntIdsStub())
|
||||||
component.provideUtility(WikiConfiguration())
|
component.provideUtility(WikiConfiguration())
|
||||||
component.provideUtility(DocutilsHTMLWriter(), name='docutils.html')
|
component.provideUtility(DocutilsHTMLWriter(), name='docutils.html')
|
||||||
component.provideUtility(DocutilsRstxParser(), name='docutils.rstx')
|
component.provideUtility(DocutilsRstxParser(), name='docutils.rstx')
|
||||||
|
|
Loading…
Add table
Reference in a new issue