[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser/tests - testAddServiceDirective.py:1.2.6.1
Suresh Babu Eddala
sbabu@zeomega.com
Mon, 21 Oct 2002 12:23:53 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv15637/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser/tests
Modified Files:
Tag: Zope3-Bangalore-TTW-Branch
testAddServiceDirective.py
Log Message:
Provided adapters ZopeContainerAdapter, AttributeAnnotations, Dependable
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser/tests/testAddServiceDirective.py 1.2 => 1.2.6.1 ===
--- Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser/tests/testAddServiceDirective.py:1.2 Wed Jul 17 12:54:18 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser/tests/testAddServiceDirective.py Mon Oct 21 12:23:53 2002
@@ -59,14 +59,28 @@
import AbsoluteURL, SiteAbsoluteURL
from Zope.Publisher.Browser.IBrowserPresentation import IBrowserPresentation
from Zope.App.OFS.Content.Folder.RootFolder import IRootFolder
+from Zope.ComponentArchitecture.GlobalAdapterService import provideAdapter
+from Zope.App.OFS.Container.IZopeContainer import IZopeContainer
+from Zope.App.OFS.Container.IContainer import IContainer
+from Zope.App.OFS.Container.ZopeContainerAdapter import ZopeContainerAdapter
+
+from Zope.App.OFS.Annotation.IAnnotatable import IAnnotatable
+from Zope.App.OFS.Annotation.IAttributeAnnotatable import IAttributeAnnotatable
+from Zope.App.OFS.Annotation.AttributeAnnotations import AttributeAnnotations
+from Zope.App.OFS.Annotation.IAnnotations import IAnnotations
+from Zope.App.DependencyFramework.IDependable import IDependable
+from Zope.App.DependencyFramework.Dependable import Dependable
class I1(Interface): pass
-class C: __implements__ = I1
+class C: __implements__ = IAttributeAnnotatable, I1
class Test(PlacefulSetup, TestCase):
def setUp(self):
PlacefulSetup.setUp(self)
+ provideAdapter(IContainer, IZopeContainer, ZopeContainerAdapter)
+ provideAdapter(IAttributeAnnotatable, IAnnotations, AttributeAnnotations)
+ provideAdapter(IAnnotatable, IDependable, Dependable)
self.buildFolders()
adapterService = getService(None, "Adapters")
@@ -107,6 +121,13 @@
name='default'),
request),
request)
+
+
+ # We need the ContentAdding to have a contentName. It normally
+ # gets set during traversal, but we aren't traversing here.
+ view.context.contentName = 'sd1'
+
+
services = list(view.services())
services.sort()
self.failUnless((('s1' in services) and
@@ -132,6 +153,10 @@
name='default'),
request),
request)
+
+ # We need the ContentAdding to have a contentName. It normally
+ # gets set during traversal, but we aren't traversing here.
+ view.context.contentName = 'sd1'
components = list(view.components())
components.sort()
@@ -157,6 +182,10 @@
request),
request)
+ # We need the ContentAdding to have a contentName. It normally
+ # gets set during traversal, but we aren't traversing here.
+ view.context.contentName = 'sd1'
+
view.action('s1',
'/folder1/folder1_1/++etc++Services/Packages/default/cd1',
)
@@ -176,6 +205,10 @@
request),
request)
+ # We need the ContentAdding to have a contentName. It normally
+ # gets set during traversal, but we aren't traversing here.
+ view.context.contentName = 'sd1'
+
view.action('s1',
'/folder1/folder1_1/++etc++Services/Packages/default/cd1',
'active')
@@ -193,6 +226,10 @@
name='default'),
request),
request)
+
+ # We need the ContentAdding to have a contentName. It normally
+ # gets set during traversal, but we aren't traversing here.
+ view.context.contentName = 'sd1'
view.action('s1',
'/folder1/folder1_1/++etc++Services/Packages/default/cd1',