Changeset 1936
- Timestamp:
- 04/03/08 03:04:27
- Files:
-
- trunk/cherrypy/test/test_refleaks.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/test/test_refleaks.py
r1931 r1936 26 26 27 27 def gc_stats(self): 28 output = [ ]28 output = ["Statistics:"] 29 29 30 30 # Uncollectable garbage … … 86 86 87 87 def test_threadlocal_garbage(self): 88 success = [] 89 88 90 def getpage(): 91 host = '127.0.0.1:%s' % self.PORT 89 92 if self.scheme == 'https': 90 c = httplib.HTTPSConnection( '127.0.0.1:%s' % self.PORT)93 c = httplib.HTTPSConnection(host) 91 94 else: 92 c = httplib.HTTPConnection( '127.0.0.1:%s' % self.PORT)95 c = httplib.HTTPConnection(host) 93 96 try: 94 c.request('GET', '/') 95 resp = c.getresponse() 96 self.assertEqual(resp.status, 200) 97 self.assertEqual(resp.read(), "Hello world!") 97 c.putrequest('GET', '/', skip_host=0) 98 c.putheader('Host', host) 99 c.endheaders() 100 response = c.getresponse() 101 body = response.read() 102 self.assertEqual(response.status, 200) 103 self.assertEqual(body, "Hello world!") 98 104 finally: 99 105 c.close() 106 success.append(True) 100 107 101 108 ts = [] … … 108 115 t.join() 109 116 117 self.assertEqual(len(success), 25) 118 110 119 self.getPage("/gc_stats") 111 self.assertBody(" ")120 self.assertBody("Statistics:") 112 121 113 122

