[Zope3-checkins]
SVN: Zope3/branches/jim-adapter/src/zope/app/dublincore/tests/test_creatorannotator.py
Remove a zope.app dependency and adjust some style.
Brian Sutherland
jinty at web.de
Tue Apr 11 19:15:09 EDT 2006
Log message for revision 66871:
Remove a zope.app dependency and adjust some style.
Changed:
U Zope3/branches/jim-adapter/src/zope/app/dublincore/tests/test_creatorannotator.py
-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/dublincore/tests/test_creatorannotator.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/dublincore/tests/test_creatorannotator.py 2006-04-11 23:06:01 UTC (rev 66870)
+++ Zope3/branches/jim-adapter/src/zope/app/dublincore/tests/test_creatorannotator.py 2006-04-11 23:15:08 UTC (rev 66871)
@@ -20,7 +20,7 @@
from zope.testing.cleanup import CleanUp
from zope.interface import Interface, implements
-from zope.app.testing import ztapi
+import zope.component
from zope.app.dublincore.creatorannotator import CreatorAnnotator
from zope.app.dublincore.interfaces import IZopeDublinCore
@@ -43,7 +43,7 @@
def _setcreator(self, value):
self.context.creators = value
- creators = property(_getcreator,_setcreator,None,"Adapted Creators")
+ creators = property(_getcreator, _setcreator, None, "Adapted Creators")
def __init__(self, context):
self.context = context
@@ -56,6 +56,7 @@
creators = ()
+
class DummyPrincipal(object):
implements(IPrincipal)
@@ -64,6 +65,7 @@
self.title = title
self.description = description
+
class DummyRequest(object):
def __init__(self, principal):
@@ -75,13 +77,13 @@
def setUp(self):
PlacefulSetup.setUp(self)
- ztapi.provideAdapter(IDummyContent, IZopeDublinCore, DummyDCAdapter)
+ gsm = zope.component.getGlobalSiteManager()
+ gsm.registerAdapter(DummyDCAdapter, (IDummyContent, ), IZopeDublinCore)
def tearDown(self):
PlacefulSetup.tearDown(self)
def test_creatorannotation(self):
-
# Create stub event and DC object
event = DummyEvent()
data = DummyDublinCore()
More information about the Zope3-Checkins
mailing list