[Zope-Checkins] CVS: Zope3/lib/python/Zope/ContextWrapper - test_wrapper.py:1.6.2.4

Fred Drake Jr fdrake@acm.org
Wed, 28 Nov 2001 17:48:58 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/ContextWrapper
In directory cvs.zope.org:/tmp/cvs-serv321

Modified Files:
      Tag: Zope-3x-branch
	test_wrapper.py 
Log Message:
Test for getinnerwrapper().

=== Zope3/lib/python/Zope/ContextWrapper/test_wrapper.py 1.6.2.3 => 1.6.2.4 ===
         self.check_getinnercontext(object())
 
+    def test_getinnerwrapper(self):
+        context = object()
+        o = object()
+        w1 = wrapper.Wrapper(o)
+        w2 = wrapper.Wrapper(w1, context)
+        x = wrapper.getinnerwrapper(w2)
+        self.assert_(x is w1)
+        self.assert_(wrapper.getinnerwrapper(o) is o)
+
     def test_getdict(self):
         w = wrapper.Wrapper(None)
         self.assert_(wrapper.getdict(w) is None)