[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/tests - testContainerTraverser.py:1.1.2.3
Jim Fulton
jim@cvs.zope.org
Tue, 19 Feb 2002 11:05:38 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/tests
In directory cvs.zope.org:/tmp/cvs-serv7148/lib/python/Zope/App/OFS/tests
Modified Files:
Tag: Zope-3x-branch
testContainerTraverser.py
Log Message:
Refactored tests to use a global-data cleanup framework.
This avoids a lot of messy clean-up code needed for tests that
use global registries, such as component services.
It is really important to make sure global registries get registered
with this framework.
See the doc strings in Zope.Testing.CleannUp.
=== Zope3/lib/python/Zope/App/OFS/tests/testContainerTraverser.py 1.1.2.2 => 1.1.2.3 ===
import unittest, sys
from Zope.ComponentArchitecture.tests.Request import Request
-from Zope.ComponentArchitecture import provideView, _clear
+from Zope.ComponentArchitecture import provideView
from Zope.App.OFS.ContainerTraverser import ContainerTraverser
from Interface import Interface
from Zope.Exceptions import NotFoundError
from Zope.App.OFS.IContainer import IContainer
+from Zope.Testing.CleanUp import CleanUp
class I(Interface): pass
@@ -54,13 +55,7 @@
-class Test(unittest.TestCase):
-
-
- def tearDown(self):
-
- _clear()
-
+class Test(CleanUp, unittest.TestCase):
def testAttr(self):
""" test container traver """