[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests - AdderBaseTests.py:1.1.2.2
Jim Fulton
jim@zope.com
Tue, 26 Mar 2002 19:47:14 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv28160/lib/python/Zope/App/OFS/Container/Views/Browser/tests
Modified Files:
Tag: Zope-3x-branch
AdderBaseTests.py
Log Message:
Merged in changes from contextual-directives branch.
Now, a leading dot in a dotted name implies the package the include
file was included from. It still defaults to ZopeProducts if a file
was not included via a package.
A few of the config files have been convered to use the
shorthand. The rest still can be converted.
I also checked this against Step 6 in the tutorial, which I will check
in in a moment.
=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests/AdderBaseTests.py 1.1.2.1 => 1.1.2.2 ===
from Zope.App.ZMI.provideClass import provideClass
from Zope.Testing.CleanUp import CleanUp # Base class w registry cleanup
+import Zope.Configuration.name
class Foo: pass
class Bar: pass
@@ -84,24 +85,24 @@
Can we get add an object back when some classes have
been registered?
"""
- provideClass( self._TestAdderView__registry()
- , qualified_name='Zope.App.OFS.tests.testContainerAdd.Foo'
- , _class=Foo
- , permission=AddPermission
- , title='Foo'
- )
- provideClass(self._TestAdderView__registry()
- , qualified_name='Zope.App.OFS.tests.testContainerAdd.Bar'
- , _class=Bar
- , permission=AddPermission
- , title='Bar'
- )
- provideClass(self._TestAdderView__registry()
- , qualified_name='Zope.App.OFS.tests.testContainerAdd.Baz'
- , _class=Baz
- , permission=AddPermission
- , title='Baz'
- )
+ provideClass(self._TestAdderView__registry(),
+ qualified_name='Zope.App.OFS.tests.testContainerAdd.Foo',
+ _class=Foo,
+ permission=AddPermission,
+ title='Foo'
+ )
+ provideClass(self._TestAdderView__registry(),
+ qualified_name='Zope.App.OFS.tests.testContainerAdd.Bar',
+ _class=Bar,
+ permission=AddPermission,
+ title='Bar'
+ )
+ provideClass(self._TestAdderView__registry(),
+ qualified_name='Zope.App.OFS.tests.testContainerAdd.Baz',
+ _class=Baz,
+ permission=AddPermission,
+ title='Baz',
+ )
container = self._TestView__newContext()
fa = self._TestView__newView( container )
@@ -125,12 +126,12 @@
def setUp(self):
CleanUp.setUp(self)
container = self._TestView__newContext()
- provideClass(self._TestAdderView__registry()
- , qualified_name='Zope.App.OFS.Container'
- , _class=container.__class__
- , permission=AddPermission
- , title='Container'
- )
+ provideClass(self._TestAdderView__registry(),
+ qualified_name='Zope.App.OFS.Container',
+ _class=container.__class__,
+ permission=AddPermission,
+ title='Container',
+ )
def testAdding(self):
"""