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)
|
||||
|
||||
def __init__(self):
|
||||
self.setup()
|
||||
|
||||
def setup(self):
|
||||
self.wikis = {}
|
||||
self.plugins = {}
|
||||
|
@ -58,7 +61,7 @@ class WikiManager(BaseConfiguration):
|
|||
def listWikis(self):
|
||||
return self.wikis.values()
|
||||
|
||||
def getPlugin(self, type, name=None):
|
||||
def getPlugin(self, type, name=''):
|
||||
plugins = self.getPlugins()
|
||||
if (type, name) in plugins:
|
||||
plugin = plugins[(type, name)]
|
||||
|
@ -105,7 +108,7 @@ class Wiki(BaseConfiguration):
|
|||
self.name = name
|
||||
self.title = title or name
|
||||
self.pages = {}
|
||||
self.setup()
|
||||
#self.setup()
|
||||
|
||||
def setup(self):
|
||||
self.getManager().addWiki(self)
|
||||
|
|
|
@ -22,7 +22,10 @@ Wiki implementation = adapters for Zope2 content objects.
|
|||
$Id$
|
||||
"""
|
||||
|
||||
from Acquisition import aq_inner, aq_parent
|
||||
try:
|
||||
from Acquisition import aq_inner, aq_parent
|
||||
except ImportError:
|
||||
pass
|
||||
from BTrees.IOBTree import IOTreeSet
|
||||
from BTrees.OOBTree import OOBTree
|
||||
from persistent.mapping import PersistentMapping
|
||||
|
|
|
@ -53,7 +53,7 @@ class Test(unittest.TestCase):
|
|||
def setUp(testCase):
|
||||
component.provideAdapter(WikiURL, (IWiki, IBrowserRequest), IAbsoluteURL)
|
||||
component.provideAdapter(PageURL, (IWikiPage, IBrowserRequest), IAbsoluteURL)
|
||||
#component.provideUtility(IntIdsStub())
|
||||
component.provideUtility(IntIdsStub())
|
||||
component.provideUtility(WikiConfiguration())
|
||||
component.provideUtility(DocutilsHTMLWriter(), name='docutils.html')
|
||||
component.provideUtility(DocutilsRstxParser(), name='docutils.rstx')
|
||||
|
|
Loading…
Add table
Reference in a new issue