Changeset 9396
- Timestamp:
- 11/12/08 05:19:37 (2 months ago)
- Files:
-
- django/trunk/django/test/client.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/test/client.py
r9188 r9396 159 159 self.cookies = SimpleCookie() 160 160 self.exc_info = None 161 self.errors = StringIO() 161 162 162 163 def store_exc_info(self, **kwargs): … … 194 195 'SERVER_PORT': '80', 195 196 'SERVER_PROTOCOL': 'HTTP/1.1', 197 'wsgi.version': (1,0), 198 'wsgi.url_scheme': 'http', 199 'wsgi.errors': self.errors, 200 'wsgi.multiprocess': True, 201 'wsgi.multithread': False, 202 'wsgi.run_once': False, 196 203 } 197 204 environ.update(self.defaults) … … 255 262 """ 256 263 r = { 257 'CONTENT_LENGTH': None,258 264 'CONTENT_TYPE': 'text/html; charset=utf-8', 259 265 'PATH_INFO': urllib.unquote(path), 260 266 'QUERY_STRING': urlencode(data, doseq=True), 261 267 'REQUEST_METHOD': 'GET', 268 'wsgi.input': FakePayload('') 262 269 } 263 270 r.update(extra) … … 290 297 """ 291 298 r = { 292 'CONTENT_LENGTH': None,293 299 'CONTENT_TYPE': 'text/html; charset=utf-8', 294 300 'PATH_INFO': urllib.unquote(path), 295 301 'QUERY_STRING': urlencode(data, doseq=True), 296 302 'REQUEST_METHOD': 'HEAD', 303 'wsgi.input': FakePayload('') 297 304 } 298 305 r.update(extra) … … 305 312 """ 306 313 r = { 307 'CONTENT_LENGTH': None,308 'CONTENT_TYPE': None,309 314 'PATH_INFO': urllib.unquote(path), 310 315 'QUERY_STRING': urlencode(data, doseq=True), 311 316 'REQUEST_METHOD': 'OPTIONS', 317 'wsgi.input': FakePayload('') 312 318 } 313 319 r.update(extra) … … 339 345 """ 340 346 r = { 341 'CONTENT_LENGTH': None,342 'CONTENT_TYPE': None,343 347 'PATH_INFO': urllib.unquote(path), 344 348 'REQUEST_METHOD': 'DELETE', 345 } 349 'wsgi.input': FakePayload('') 350 } 346 351 r.update(extra) 347 352
