Changeset 1913
- Timestamp:
- 03/10/08 01:37:21
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/598-sendall/cherrypy/test/test_session.py
r1868 r1913 2 2 test.prefer_parent_path() 3 3 4 import httplib 4 5 import os 5 6 localDir = os.path.dirname(__file__) … … 190 191 191 192 def request(index): 193 if self.scheme == 'https': 194 c = httplib.HTTPSConnection('127.0.0.1:%s' % self.PORT) 195 else: 196 c = httplib.HTTPConnection('127.0.0.1:%s' % self.PORT) 192 197 for i in xrange(request_count): 193 self.getPage("/", cookies) 198 c.putrequest('GET', '/') 199 for k, v in cookies: 200 c.putheader(k, v) 201 c.endheaders() 202 response = c.getresponse() 203 self.assertEqual(response.status, 200) 204 body = response.read() 205 self.failUnless(body.isdigit()) 194 206 # Uncomment the following line to prove threads overlap. 195 207 ## print index, 196 data_dict[index] = v = int(self.body)208 data_dict[index] = max(data_dict[index], int(body)) 197 209 198 210 # Start <request_count> requests from each of

