[Zope3-checkins] CVS: Zope3/src/zope/app/cache/tests - test_cachename.py:1.1.2.3
Fred L. Drake, Jr.
fred@zope.com
Tue, 24 Dec 2002 09:52:58 -0500
Update of /cvs-repository/Zope3/src/zope/app/cache/tests
In directory cvs.zope.org:/tmp/cvs-serv23127
Modified Files:
Tag: NameGeddon-branch
test_cachename.py
Log Message:
- cleanup imports
- normalize whitespace
=== Zope3/src/zope/app/cache/tests/test_cachename.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/cache/tests/test_cachename.py:1.1.2.2 Mon Dec 23 18:52:31 2002
+++ Zope3/src/zope/app/cache/tests/test_cachename.py Tue Dec 24 09:52:57 2002
@@ -18,30 +18,29 @@
$Id$
"""
-from unittest import TestCase, TestSuite, main, makeSuite
-from zope.proxy.context import ContextWrapper
+import unittest
-from zope.app.services.tests.placefulsetup \
- import PlacefulSetup
-from zope.app.services.tests.testingservicemanager \
- import TestingServiceManager
+from zope.proxy.context import ContextWrapper
from zope.app.interfaces.cache.cache import CacheName
+from zope.app.services.tests.placefulsetup import PlacefulSetup
+from zope.app.services.tests.testingservicemanager import TestingServiceManager
+
class CachingServiceStub(object):
def getAvailableCaches(self):
return 'foo', 'bar', 'baz'
-
-class Test(PlacefulSetup, TestCase):
+
+class CacheNameTest(PlacefulSetup, unittest.TestCase):
def setUp(self):
PlacefulSetup.setUp(self)
self.buildFolders()
sm = TestingServiceManager()
self.rootFolder.setServiceManager(sm)
- sm.Caching = CachingServiceStub()
+ sm.Caching = CachingServiceStub()
def test(self):
field = CacheName().bind(self.rootFolder)
@@ -49,11 +48,9 @@
allowed.sort()
self.assertEqual(allowed, ['', 'bar', 'baz', 'foo'])
-
+
def test_suite():
- return TestSuite((
- makeSuite(Test),
- ))
+ return unittest.makeSuite(CacheNameTest)
if __name__=='__main__':
- main(defaultTest='test_suite')
+ unittest.main(defaultTest='test_suite')