Changeset 453
- Timestamp:
- 07/11/05 15:37:05
- Files:
-
- trunk/cherrypy/test/test_session_filter.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/test/test_session_filter.py
r444 r453 26 26 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 """ 28 29 testThreadCount = 3 28 30 29 31 import unittest … … 91 93 class SessionFilterTest(unittest.TestCase): 92 94 93 def __testSession(self, requestPath, iterations = 5, persistant=False): 94 #cherrypy.config.update({"sessionFilter.storageType": storageType}) 95 def __testSession(self, requestPath, iterations = 5, persistant=False, dummy = None): 95 96 96 97 helper.request(requestPath) … … 107 108 self.assertEqual(cherrypy.response.body, str(n)) 108 109 109 def __testCleanUp(self, storageType): 110 pass 110 return cookie 111 112 def testCleanUp(self, testPath = '/ram'): 113 cookies = [] 114 for n in xrange(5): 115 continue 116 cookies.append(self.__testSesssion(testPath, persistant=False)) 117 118 SessionFilter = cherrypy._cputil._cpDefaultFilterInstances['SessionFilter'] 119 sessionManagers = SessionFilter.sessionManagers 111 120 112 121 def __testCacheCleanUp(self, storageType): … … 124 133 def testAnydbSessions(self): 125 134 self.__testSession('/anydb', persistant=True) 126 127 def __testThreadSafety(self):128 for z in range( 30):129 threading.Thread(target = self.__testSession, args = ('/ram' )).start()135 136 def testThreadSafety(self): 137 for z in range(testThreadCount): 138 threading.Thread(target = self.__testSession, args = ('/ram',)).start() 130 139 131 140 '''

