Commit 6ca418a5 authored by Chris McDonough's avatar Chris McDonough

Test changes to cAccessControl.c to support gettattr (collector 167).

parent faa56cdc
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"""Tests of PermissionRole """Tests of PermissionRole
""" """
__rcs_id__='$Id: testPermissionRole.py,v 1.3 2002/08/14 21:28:08 mj Exp $' __rcs_id__='$Id: testPermissionRole.py,v 1.4 2002/12/16 19:15:05 chrism Exp $'
__version__='$Revision: 1.3 $'[11:-2] __version__='$Revision: 1.4 $'[11:-2]
import os, sys, unittest import os, sys, unittest
...@@ -122,6 +122,12 @@ class PermissionRoleTests (unittest.TestCase): ...@@ -122,6 +122,12 @@ class PermissionRoleTests (unittest.TestCase):
assertPRoles(o, EditThingsPermission, ()) assertPRoles(o, EditThingsPermission, ())
assertPRoles(o, DeletePermission, ()) assertPRoles(o, DeletePermission, ())
def testPermissionRoleSupportsGetattr(self):
a = PermissionRole('a')
self.failUnless(getattr(a, '__roles__') == ('Manager',))
self.failUnless(getattr(a, '_d') == ('Manager',))
self.failUnless(getattr(a, '__name__') == 'a')
self.failUnless(getattr(a, '_p') == '_a_Permission')
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
......
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