Test if registry has been registered.

svn path=/plone.app.discussion/trunk/; revision=39356
This commit is contained in:
Timo Stollenwerk 2010-08-28 22:58:23 +00:00
parent c530e2dbf3
commit 23122ded8b

View File

@ -2,8 +2,10 @@
import unittest import unittest
from zope.component import getMultiAdapter from zope.component import getMultiAdapter
from zope.component import createObject, queryUtility
from plone.registry import Registry from plone.registry import Registry
from plone.registry.interfaces import IRegistry
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.PloneTestCase.ptc import PloneTestCase from Products.PloneTestCase.ptc import PloneTestCase
@ -22,6 +24,10 @@ class RegistryTest(PloneTestCase):
self.registry = Registry() self.registry = Registry()
self.registry.registerInterface(IDiscussionSettings) self.registry.registerInterface(IDiscussionSettings)
def test_registry_registered(self):
registry = queryUtility(IRegistry)
self.failUnless(registry.forInterface(IDiscussionSettings))
def test_discussion_controlpanel_view(self): def test_discussion_controlpanel_view(self):
view = getMultiAdapter((self.portal, self.portal.REQUEST), view = getMultiAdapter((self.portal, self.portal.REQUEST),
name="discussion-settings") name="discussion-settings")