[Zope-Checkins] CVS: Zope/lib/python/AccessControl/tests - testOwned.py:1.1.4.2

Tres Seaver tseaver at zope.com
Fri Mar 12 11:58:31 EST 2004


Update of /cvs-repository/Zope/lib/python/AccessControl/tests
In directory cvs.zope.org:/tmp/cvs-serv11528/lib/python/AccessControl/tests

Modified Files:
      Tag: Zope-2_7-branch
	testOwned.py 
Log Message:


  - Collector #1255:  getWrappedOwner() must return None if the object
    is owned by the UnownableOwner.


=== Zope/lib/python/AccessControl/tests/testOwned.py 1.1.4.1 => 1.1.4.2 ===
--- Zope/lib/python/AccessControl/tests/testOwned.py:1.1.4.1	Tue Jan 27 11:27:42 2004
+++ Zope/lib/python/AccessControl/tests/testOwned.py	Fri Mar 12 11:58:31 2004
@@ -118,6 +118,15 @@
 
         self.assertEqual(wrapped_owner, None)
 
+    def test_getWrappedOwner_unownable(self):
+        from AccessControl.Owned import UnownableOwner
+        owned = self._makeOne()
+        owned._owner = UnownableOwner
+
+        wrapped_owner = owned.getWrappedOwner()
+
+        self.assertEqual(wrapped_owner, None)
+
     def test_getWrappedOwner_simple(self):
 
         root = FauxRoot()




More information about the Zope-Checkins mailing list