The TestResponse class is accessible via the paste.fixture module.
A response 'contains' a string if it is present in the body of the response. Whitespace is normalized when searching for a string.
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.
All the given patterns are ANDed together:
If more than one link matches, then the index link is followed. If index is not given and more than one link matches, or if no link matches, then IndexError will be raised.
If you give verbose then messages will be printed about each link, and why it does or doesn't match. If you use app.click(verbose=True) you'll see a list of all the links.
You can use multiple criteria to essentially assert multiple aspects about the link, e.g., where the link's destination is.
Like .click(), except looks for link-like buttons. This kind of button should look like <button onclick="...location.href='url'...">.
If this request is a redirect, follow that redirect. It is an error if this is not a redirect response. Returns another response object.
Returns a dictionary of Form objects. Indexes are both in order (from zero) and by form id (if the form is given an id).
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.
All hostnames and schemes will be ignored.
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)
Assert that the response contains all of the strings passed in as arguments.
Equivalent to:
assert string in res
Show this response in a browser window (for debugging purposes, when it's hard to read the HTML).
See the source for more information.