[Zope3-checkins] CVS: Zope3/src/zope/context/tests - test_wrapper.py:1.15

Jim Fulton jim@zope.com
Wed, 28 May 2003 13:19:53 -0400


Update of /cvs-repository/Zope3/src/zope/context/tests
In directory cvs.zope.org:/tmp/cvs-serv25942/src/zope/context/tests

Modified Files:
	test_wrapper.py 
Log Message:
renamed zope.proxy.getObject to zope.proxy.getProxiedObject


=== Zope3/src/zope/context/tests/test_wrapper.py 1.14 => 1.15 ===
--- Zope3/src/zope/context/tests/test_wrapper.py:1.14	Wed May 28 11:48:06 2003
+++ Zope3/src/zope/context/tests/test_wrapper.py	Wed May 28 13:19:23 2003
@@ -17,7 +17,7 @@
 import pickle
 import unittest
 
-from zope.proxy import getObject
+from zope.proxy import getProxiedObject
 from zope.context import wrapper, getcontext, ContextWrapper
 from zope.context import ContextMethod, ContextProperty, ContextAware
 from zope.proxy.tests.test_proxy import Thing, ProxyTestCase
@@ -36,7 +36,7 @@
         o2 = object()
         o3 = object()
         w = self.new_proxy((o1, o2), o3)
-        self.assertEquals(getObject(w), (o1, o2))
+        self.assertEquals(getProxiedObject(w), (o1, o2))
         self.assert_(wrapper.getcontext(w) is o3)
 
     def test_subclass_constructor(self):
@@ -45,7 +45,7 @@
                 super(MyWrapper, self).__init__('foo', **kwds)
 
         w = MyWrapper(1, 2, key='value')
-        self.assertEquals(getObject(w), 'foo')
+        self.assertEquals(getProxiedObject(w), 'foo')
         self.assertEquals(wrapper.getdict(w), {'key': 'value'})
 
         # __new__ catches too many positional args:
@@ -55,7 +55,7 @@
         o1 = 1
         o2 = 12
         w = self.new_proxy(o1)
-        self.assert_(o1 is getObject(w))
+        self.assert_(o1 is getProxiedObject(w))
         self.assert_(wrapper.getdict(w) is None)
         d = wrapper.getdictcreate(w)
         self.assert_(wrapper.getdictcreate(w) is d)
@@ -67,12 +67,12 @@
         self.assert_(wrapper.getcontext(w) is None)
 
         wrapper.setobject(w, o2)
-        self.assert_(getObject(w) is o2)
+        self.assert_(getProxiedObject(w) is o2)
 
         # test 2-argument version of constructor
         o = object()
         w = self.new_proxy(o, c)
-        self.assert_(getObject(w) is o)
+        self.assert_(getProxiedObject(w) is o)
         self.assert_(wrapper.getcontext(w) is c)
 
     def test_wrapper_subclass_attributes(self):
@@ -155,7 +155,7 @@
                 # Need to get __dict__ from the clean object, because it
                 # is a special descriptor and complains bitterly about
                 # being got from the wrong kind of object.
-                return getObject(self).__dict__['args']
+                return getProxiedObject(self).__dict__['args']
 
         y = Y(23)
         p = self.new_proxy(y, 23)
@@ -470,9 +470,9 @@
         obj1 = object()
         obj2 = object()
         w = self.new_proxy(obj1)
-        self.assert_(getObject(w) is obj1)
+        self.assert_(getProxiedObject(w) is obj1)
         wrapper.setobject(w, obj2)
-        self.assert_(getObject(w) is obj2)
+        self.assert_(getProxiedObject(w) is obj2)
 
     def test_setcontext(self):
         w = self.new_proxy(None)