Module request_factory
source code
|
FakePayload
A wrapper around StringIO that restricts what can be read since
data from the network can't be seeked and cannot be read outside of
its content length.
|
|
ClientHandler
A HTTP Handler that can be used for testing purposes.
|
|
RequestFactory
Class that lets you create mock Request objects for use in testing.
|
|
Client
A class that can act as a client for testing purposes.
|
|
fakeRequest(method,
path="/",
params={},
**kwargs) |
source code
|
|
|
store_rendered_templates(store,
signal,
sender,
template,
context,
**kwargs)
Stores templates and contexts that are rendered. |
source code
|
|
|
|
|
|
|
BOUNDARY = 'BoUnDaRyStRiNg'
|
|
MULTIPART_CONTENT = 'multipart/form-data; boundary=%s' % BOUNDARY
|
|
CONTENT_TYPE_RE = re.compile('.*; charset=([\w\d-]+);?')
|
Imports:
urllib,
urlparse,
urlunparse,
urlsplit,
sys,
os,
re,
mimetypes,
warnings,
StringIO,
settings,
authenticate,
login,
BaseHandler,
WSGIRequest,
got_request_exception,
SimpleCookie,
HttpRequest,
QueryDict,
TemplateDoesNotExist,
signals,
curry,
smart_str,
urlencode,
import_module,
is_iterable,
transaction,
close_connection,
ContextList,
webgateway_views
Encodes multipart POST data from a dictionary of form values.
The key will be used as the form data name; the value will be
transmitted as content. If the value is a file, the contents of the file
will be sent as an application/octet-stream; otherwise, str(value) will
be sent.
|