[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Traversing/tests - testConvenienceFunctions.py:1.10
Steve Alexander
steve@cat-box.net
Thu, 5 Dec 2002 09:29:22 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Traversing/tests
In directory cvs.zope.org:/tmp/cvs-serv12957/lib/python/Zope/App/Traversing/tests
Modified Files:
testConvenienceFunctions.py
Log Message:
getting Parent and Parents depends on them being wrapped, so we should
insist on having a context wrapped object here.
=== Zope3/lib/python/Zope/App/Traversing/tests/testConvenienceFunctions.py 1.9 => 1.10 ===
--- Zope3/lib/python/Zope/App/Traversing/tests/testConvenienceFunctions.py:1.9 Thu Dec 5 08:45:59 2002
+++ Zope3/lib/python/Zope/App/Traversing/tests/testConvenienceFunctions.py Thu Dec 5 09:29:22 2002
@@ -151,6 +151,23 @@
[self.folder, self.root]
)
+
+ def testGetParentsFromUnwrapped(self):
+ from Zope.App.Traversing import getParents
+ self.assertRaises(
+ TypeError,
+ getParents,
+ self.unwrapped_item
+ )
+
+ def testGetParentFromUnwrapped(self):
+ from Zope.App.Traversing import getParent
+ self.assertRaises(
+ TypeError,
+ getParent,
+ self.unwrapped_item
+ )
+
def testGetPhysicalPath(self):
from Zope.App.Traversing import getPhysicalPath
self.assertEqual(