Changeset 1792
- Timestamp:
- 10/27/07 23:21:50
- Files:
-
- trunk/cherrypy/test/webtest.py (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/test/webtest.py
r1761 r1792 339 339 if not self.status == status: 340 340 if msg is None: 341 msg = 'Status (% s) != %s' % (`self.status`, `status`)341 msg = 'Status (%r) != %r' % (self.status, status) 342 342 self._handlewebError(msg) 343 343 elif isinstance(status, int): … … 345 345 if code != status: 346 346 if msg is None: 347 msg = 'Status (% s) != %s' % (`self.status`, `status`)347 msg = 'Status (%r) != %r' % (self.status, status) 348 348 self._handlewebError(msg) 349 349 else: … … 360 360 if not match: 361 361 if msg is None: 362 msg = 'Status (% s) not in %s' % (`self.status`, `status`)362 msg = 'Status (%r) not in %r' % (self.status, status) 363 363 self._handlewebError(msg) 364 364 … … 373 373 if msg is None: 374 374 if value is None: 375 msg = '% s not in headers' % `key`375 msg = '%r not in headers' % key 376 376 else: 377 msg = '% s:%s not in headers' % (`key`, `value`)377 msg = '%r:%r not in headers' % (key, value) 378 378 self._handlewebError(msg) 379 379 … … 384 384 if matches: 385 385 if msg is None: 386 msg = '% s in headers' % `key`386 msg = '%r in headers' % key 387 387 self._handlewebError(msg) 388 388 … … 391 391 if value != self.body: 392 392 if msg is None: 393 msg = 'expected body:\n% s\n\nactual body:\n%s' % (`value`, `self.body`)393 msg = 'expected body:\n%r\n\nactual body:\n%r' % (value, self.body) 394 394 self._handlewebError(msg) 395 395 … … 398 398 if value not in self.body: 399 399 if msg is None: 400 msg = '% s not in body' % `value`400 msg = '%r not in body' % value 401 401 self._handlewebError(msg) 402 402 … … 405 405 if value in self.body: 406 406 if msg is None: 407 msg = '% s found in body' % `value`407 msg = '%r found in body' % value 408 408 self._handlewebError(msg) 409 409 … … 412 412 if re.search(pattern, self.body, flags) is None: 413 413 if msg is None: 414 msg = 'No match for % s in body' % `pattern`414 msg = 'No match for %r in body' % pattern 415 415 self._handlewebError(msg) 416 416

