Back to index

plone3  3.1.7
Public Member Functions
CMFCore.tests.test_FSSecurity.DebugModeTests Class Reference
Inheritance diagram for CMFCore.tests.test_FSSecurity.DebugModeTests:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.tests.test_FSSecurity.DebugModeTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_addPRM
def test_delPRM
def test_editPRM
def test_DelAddEditPRM
def setUp
def tearDown

Detailed Description

Definition at line 106 of file test_FSSecurity.py.


Member Function Documentation

Definition at line 55 of file test_FSSecurity.py.

00055 
00056     def setUp( self ):
00057         # initialise skins
00058         WritableFSDVTest.setUp(self)
00059         self._registerDirectory(self)
00060         # set up ZODB
00061         RequestTest.setUp(self)
00062         # put object in ZODB
00063         root=self.root
00064         try: root._delObject('fake_skin')
00065         except AttributeError: pass
00066         root._setObject( 'fake_skin', self.ob.fake_skin )

Here is the call graph for this function:

Definition at line 67 of file test_FSSecurity.py.

00067 
00068     def tearDown( self ):
00069         RequestTest.tearDown(self)
00070         WritableFSDVTest.tearDown(self)
00071         self._ignore_log_errors()
00072         self._ignore_log_errors(subsystem='CMFCore.DirectoryView')
00073 

Here is the call graph for this function:

Definition at line 108 of file test_FSSecurity.py.

00108 
00109         def test_addPRM( self ):
00110             # Test adding of a .security
00111             # baseline
00112             self._checkSettings(self.ob.fake_skin.test5,'View',1,[])
00113             # add
00114             self._writeFile('test5.py.security','View:acquire:Manager')
00115             # test
00116             self._checkSettings(self.ob.fake_skin.test5,'View',1,['Manager'])

Here is the call graph for this function:

Definition at line 144 of file test_FSSecurity.py.

00144 
00145         def test_DelAddEditPRM( self ):
00146             # Test deleting, then adding, then editing a .security file
00147             # baseline
00148             self._writeFile('test5.py.security','View::Manager')
00149             # delete
00150             self._deleteFile('test5.py.security')
00151             self._checkSettings(self.ob.fake_skin.test5,'View',1,[])
00152 
00153             # we need to wait a second here or the mtime will actually
00154             # have the same value, no human makes two edits in less
00155             # than a second ;-)
00156             sleep(1)
00157 
00158             # add back
00159             self._writeFile('test5.py.security','View::Manager,Anonymous')
00160             self._checkSettings(self.ob.fake_skin.test5,'View',0,['Manager','Anonymous'])
00161 
00162             # edit
00163             self._writeFile('test5.py.security','View:acquire:Manager')
00164             # test
00165             self._checkSettings(self.ob.fake_skin.test5,'View',1,['Manager'])
00166 
00167 else:
00168 
    class DebugModeTests( FSSecurityBase ):

Here is the call graph for this function:

Definition at line 117 of file test_FSSecurity.py.

00117 
00118         def test_delPRM( self ):
00119             # Test deleting of a .security
00120             # baseline
00121             self._checkSettings(self.ob.fake_skin.test5,'View',1,[])
00122             self._writeFile('test5.py.security','View:acquire:Manager')
00123             self._checkSettings(self.ob.fake_skin.test5,'View',1,['Manager'])
00124             # delete
00125             self._deleteFile('test5.py.security')
00126             # test
00127             self._checkSettings(self.ob.fake_skin.test5,'View',1,[])

Here is the call graph for this function:

Definition at line 128 of file test_FSSecurity.py.

00128 
00129         def test_editPRM( self ):
00130             # Test editing a .security
00131             # we need to wait a second here or the mtime will actually
00132             # have the same value as set in the last test.
00133             # Maybe someone brainier than me can figure out a way to make this
00134             # suck less :-(
00135             sleep(1)
00136 
00137             # baseline
00138             self._writeFile('test5.py.security','View::Manager,Anonymous')
00139             self._checkSettings(self.ob.fake_skin.test5,'View',0,['Manager','Anonymous'])
00140             # edit
00141             self._writeFile('test5.py.security','View:acquire:Manager')
00142             # test
00143             self._checkSettings(self.ob.fake_skin.test5,'View',1,['Manager'])

Here is the call graph for this function:


The documentation for this class was generated from the following file: