[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/tests - testTraversable.py:1.1.2.2
Martijn Pieters
mj@zope.com
Mon, 3 Dec 2001 11:42:34 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/tests
In directory cvs.zope.org:/tmp/cvs-serv10075/lib/python/Zope/App/tests
Modified Files:
Tag: Zope-3x-branch
testTraversable.py
Log Message:
- Register Traversable as a feature.
- Do the right thing for unwrapped objects.
=== Zope3/lib/python/Zope/App/tests/testTraversable.py 1.1.2.1 => 1.1.2.2 ===
self.assertEquals(self.tr.getPhysicalPath(), ('', 'folder', 'item'))
+ def testUnwrapped(self):
+ # The feature should do the right thing for unwrapped objects too
+ unwrapped = C('unwrapped')
+ tr = Traversable(unwrapped)
+ self.assertEquals(tr.getPhysicalPath(), ())
+ self.failUnless(tr.getPhysicalRoot() is unwrapped)
+
def test_suite():
loader = unittest.TestLoader()
return loader.loadTestsFromTestCase(TraversableTests)