frun...
- Run the command, with the given arguments. The script
argument can have space-separated arguments, or you can use
the positional arguments.
fclear...
- Delete all the files in the base directory.
fwritefile...
- Write a file to the given path. If content is given then
that text is written, otherwise the file in frompath is
used. frompath is relative to self.template_path
f__init__...
- Creates an environment. base_path is used as the current
working directory, and generally where changes are looked for.
freset...
- Resets the state of the application; currently just clears
saved cookies.
fencode_multipart...
- Encodes a set of parameters (typically a name/value list) and
a set of files (a list of (name, filename, file_body)) into a
typical POST body, returning the (content_type, body).
fdo_request...
- Executes the given request (req), with the expected
status. Generally .get() and .post() are used
instead.
fput...
- Do a PUT request. Very like the .get() method.
params are put in the body of the request.
fget...
- Get the given url (well, actually a path like
'/page.html').
fpost...
- Do a POST request. Very like the .get() method.
params are put in the body of the request.
f__init__...
- Wraps a WSGI application in a more convenient interface for
testing.
fdelete...
- Do a DELETE request. Very like the .get() method.
params are put in the body of the request.
CForm...
- This object represents a form that has been found in a page.
This has a couple useful attributes:
fset...
- Set the given name, using index to disambiguate.
f__getitem__...
- Get the named field object (ambiguity is an error).
fget...
- Get the named/indexed field object, or default if no field
is found.
fsubmit_fields...
- Return a list of [(name,value),...] for the current
state of the form.
fsubmit...
- Submits the form. If name is given, then also select that
button (using index to disambiguate)``.
f__setitem__...
- Set the value of the named field. If there is 0 or multiple
fields by that name, it is an error.
fgoto...
- Go to the (potentially relative) link href, using the
given method ('get' or 'post') and any extra arguments
you want to pass to the app.get() or app.post()
methods.
f__contains__...
- A response 'contains' a string if it is present in the body
of the response. Whitespace is normalized when searching
for a string.
fmustcontain...
- Assert that the response contains all of the strings passed
in as arguments.
fclickbutton...
- Like .click(), except looks for link-like buttons.
This kind of button should look like
<buttononclick="...location.href='url'...">.
fheader...
- Returns the named header; an error if there is not exactly one
matching header (unless you give a default -- always an error
if there is more than one header)
fclick...
- Click the link as described. Each of description,
linkid, and url are patterns, meaning that they are
either strings (regular expressions), compiled regular
expressions (objects with a search method), or callables
returning true or false.
CCheckbox...
- Field representing <inputtype="checkbox">
fhtml_unquote...
- Unquote (some) entities in HTML. (incomplete)
ftempnam_no_warning...
- An os.tempnam with the warning turned off, because sometimes
you just need to use this and don't care about the stupid
security warning.
fsetup_module...
- This is used by py.test if it is in the module, so you can
import this directly.