[CMF-checkins] CVS: CMF/CMFCore/tests - test_TypesTool.py:1.21.6.2 test_URLTool.py:1.3.22.1
Yvo Schubbe
schubbe@web.de
Wed, 11 Jun 2003 05:55:11 -0400
Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv23877/CMFCore/tests
Modified Files:
Tag: yuppie-collector165-branch
test_TypesTool.py test_URLTool.py
Log Message:
- more dummy refactoring
=== CMF/CMFCore/tests/test_TypesTool.py 1.21.6.1 => 1.21.6.2 ===
--- CMF/CMFCore/tests/test_TypesTool.py:1.21.6.1 Tue Jun 10 13:14:32 2003
+++ CMF/CMFCore/tests/test_TypesTool.py Wed Jun 11 05:55:10 2003
@@ -60,7 +60,6 @@
SecurityTest.setUp(self)
self.site = DummySite('site').__of__(self.root)
self.acl_users = self.site._setObject( 'acl_users', DummyUserFolder() )
- setattr( self.acl_users, 'all_powerful_Oz', OmnipotentUser() )
self.ttool = self.site._setObject( 'portal_types', TypesTool() )
self.ttool._setObject( 'Dummy Content', DummyFTI )
=== CMF/CMFCore/tests/test_URLTool.py 1.3 => 1.3.22.1 ===
--- CMF/CMFCore/tests/test_URLTool.py:1.3 Mon Jan 6 15:41:20 2003
+++ CMF/CMFCore/tests/test_URLTool.py Wed Jun 11 05:55:10 2003
@@ -2,40 +2,21 @@
import Zope
try:
+ Zope.startup()
+except AttributeError:
+ # for Zope versions before 2.6.1
+ pass
+try:
from Interface.Verify import verifyClass
except ImportError:
# for Zope versions before 2.6.0
from Interface import verify_class_implementation as verifyClass
-from Products.CMFCore.tests.base.dummy import DummyFolder as BaseDummyFolder
from Products.CMFCore.tests.base.dummy import DummyContent
+from Products.CMFCore.tests.base.dummy import DummyFolder
+from Products.CMFCore.tests.base.dummy import DummySite
from Products.CMFCore.URLTool import URLTool
-
-
-class DummyFolder(BaseDummyFolder):
-
- def __init__(self, id='', fake_product=0, prefix=''):
- BaseDummyFolder.__init__(self, fake_product, prefix)
- self._id = id
-
- def getId(self):
- return self._id
-
- def getPhysicalPath(self):
- return self.aq_inner.aq_parent.getPhysicalPath() + ( self._id, )
-
-
-class DummySite(DummyFolder):
-
- _domain = 'http://www.foobar.com'
- _path = 'bar'
-
- def absolute_url(self, relative=0):
- return '/'.join( (self._domain, self._path, self._id) )
-
- def getPhysicalPath(self):
- return ('', self._path, self._id)
class URLToolTests(TestCase):