| Home | Trees | Index | Help |
|
|---|
| Package cherrypy :: Package test :: Module webtest :: Class WebCase |
|
object--+ |TestCase--+ | WebCase
CPWebCase| Method Summary | |
|---|---|
__call__(self,
result)
| |
Fail if value != self.body. | |
Fail if (key, [value]) not in self.headers. | |
Fail if value not in self.body. | |
Fail if value (a regex pattern) is not in self.body. | |
Fail if key in self.headers. | |
Fail if value in self.body. | |
Fail if self.status != status. | |
exit(self)
| |
Open the url with debugging support. | |
Make our HTTP_CONN persistent (or not). | |
| Inherited from TestCase | |
Create an instance of the class that will use the named test method when executed. | |
| |
| |
Fail the test unless the expression is true. | |
Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero. | |
Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero. | |
Fail if the two objects are unequal as determined by the '==' operator. | |
Fail if the two objects are unequal as determined by the '==' operator. | |
Fail the test if the expression is true. | |
Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero. | |
Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero. | |
Fail if the two objects are equal as determined by the '==' operator. | |
Fail if the two objects are equal as determined by the '==' operator. | |
Fail unless an exception of class excClass is thrown by callableObj when invoked with arguments args and keyword arguments kwargs. | |
Fail the test unless the expression is true. | |
| |
Run the test without collecting errors in a TestResult | |
| |
Fail immediately, with the given message. | |
Fail the test if the expression is true. | |
Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero. | |
Fail if the two objects are equal as determined by the '==' operator. | |
Fail the test unless the expression is true. | |
Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero. | |
Fail if the two objects are unequal as determined by the '==' operator. | |
Fail unless an exception of class excClass is thrown by callableObj when invoked with arguments args and keyword arguments kwargs. | |
| |
| |
Hook method for setting up the test fixture before exercising it. | |
Returns a one-line description of the test, or None if no description has been provided. | |
Hook method for deconstructing the test fixture after testing it. | |
| Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
| Property Summary | |
|---|---|
persistent | |
| Class Variable Summary | |
|---|---|
int |
console_height = 30 |
str |
HOST = '127.0.0.1'
|
classobj |
HTTP_CONN = httplib.HTTPConnection |
bool |
interactive = True
|
int |
PORT = 8000 |
str |
PROTOCOL = 'HTTP/1.1'
|
| Method Details |
|---|
assertBody(self, value, msg=None)Fail if value != self.body. |
assertHeader(self, key, value=None, msg=None)Fail if (key, [value]) not in self.headers. |
assertInBody(self, value, msg=None)Fail if value not in self.body. |
assertMatchesBody(self, pattern, msg=None, flags=0)Fail if value (a regex pattern) is not in self.body. |
assertNoHeader(self, key, msg=None)Fail if key in self.headers. |
assertNotInBody(self, value, msg=None)Fail if value in self.body. |
assertStatus(self, status, msg=None)Fail if self.status != status. |
getPage(self, url, headers=None, method='GET', body=None, protocol=None)Open the url with debugging support. Return status, headers, body. |
set_persistent(self, on=True, auto_open=False)Make our HTTP_CONN persistent (or not). If the 'on' argument is True (the default), then self.HTTP_CONN will be set to an instance of httplib.HTTPConnection (or HTTPS if self.scheme is "https"). This will then persist across requests. We only allow for a single open connection, so if you call this and we currently have an open connection, it will be closed. |
| Class Variable Details |
|---|
console_height
|
HOST
|
interactive
|
PORT
|
PROTOCOL
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Jul 19 15:32:17 2007 | http://epydoc.sf.net |