Package funkload :: Module PatchWebunit
[show private | hide private]
[frames | no frames]

Module funkload.PatchWebunit

Patching Richard Jones' webunit for FunkLoad.

* Add cache for links (css, js)
* store a browser history
* add headers
* log response
* remove webunit log
* fix HTTPResponse __repr__
* patching webunit mimeEncode to be rfc 1945 3.6.2 compliant using CRLF
* patching to remove cookie with a 'deleted' value
* patching to have application/x-www-form-urlencoded by default and only
  multipart when a file is posted

$Id: PatchWebunit.py 24649 2005-08-29 14:20:19Z bdelbosc $

Classes
FKLIMGSucker Image and links loader, patched to log response stats.

Function Summary
  HR___repr__(self)
fix HTTPResponse rendering.
  mimeEncode(data, sep_boundary, end_boundary)
Take the mapping of data and construct the body of a multipart/form-data message with it using the indicated boundaries.
  WF_fetch(self, url, postdata, server, port, protocol, ok_codes)
Run a single test request to the indicated url.
  WTC_log(self, message, content)
Remove webunit logging.
  WTC_pageImages(self, url, page, testcase)
Given the HTML page that was loaded from url, grab all the images.

Variable Summary
str BOUNDARY = '--------------GHSKFJDLGDS7543FJKLFHRE7564275...
str END_BOUNDARY = '----------------GHSKFJDLGDS7543FJKLFHRE7...
str SEP_BOUNDARY = '----------------GHSKFJDLGDS7543FJKLFHRE7...

Function Details

HR___repr__(self)

fix HTTPResponse rendering.

mimeEncode(data, sep_boundary='----------------GHSKFJDLGDS7543FJKLFHRE75642756743254', end_boundary='----------------GHSKFJDLGDS7543FJKLFHRE75642756743254--')

Take the mapping of data and construct the body of a multipart/form-data message with it using the indicated boundaries.

WF_fetch(self, url, postdata=None, server=None, port=None, protocol=None, ok_codes=None)

Run a single test request to the indicated url. Use the POST data if supplied.

Raises failureException if the returned data contains any of the strings indicated to be Error Content. Returns a HTTPReponse object wrapping the response from the server.

WTC_log(self, message, content)

Remove webunit logging.

WTC_pageImages(self, url, page, testcase=None)

Given the HTML page that was loaded from url, grab all the images.

Variable Details

BOUNDARY

Type:
str
Value:
'--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'                  

END_BOUNDARY

Type:
str
Value:
'----------------GHSKFJDLGDS7543FJKLFHRE75642756743254--'              

SEP_BOUNDARY

Type:
str
Value:
'----------------GHSKFJDLGDS7543FJKLFHRE75642756743254'                

Generated by Epydoc 2.1 on Tue Feb 27 10:41:42 2007 http://epydoc.sf.net