Commit bcdbbae2 authored by Tres Seaver's avatar Tres Seaver

- Forward port fix for Collector #1255.

parent ef0a9070
......@@ -12,7 +12,7 @@
##############################################################################
"""Support for owned objects
$Id: Owned.py,v 1.23 2004/01/29 19:33:03 Brian Exp $
$Id: Owned.py,v 1.24 2004/03/12 18:12:11 tseaver Exp $
"""
import Globals, urlparse, SpecialUsers, ExtensionClass
......@@ -117,7 +117,7 @@ class Owned(ExtensionClass.Base):
"""
owner = self.getOwnerTuple()
if owner is None:
if owner is None or owner is UnownableOwner:
return None
udb_path, oid = owner
......
"""Unit tests for AccessControl.Owned
$Id: testOwned.py,v 1.2 2004/01/27 16:59:23 tseaver Exp $
$Id: testOwned.py,v 1.3 2004/03/12 18:12:11 tseaver Exp $
"""
import unittest
......@@ -118,6 +118,15 @@ class OwnedTests(unittest.TestCase):
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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment