There are no implemented interfaces.
failureException
(type: classobj
)
<class exceptions.AssertionError at 0x403a18cc>
layer
(type: instance
)
<zope.app.testing.functional.ZCMLLayer instance at 0x4172266c>
abort()
assertAlmostEqual(first, second, places=7, msg=None)
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.
Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).
assertAlmostEquals(first, second, places=7, msg=None)
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.
Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).
assertEqual(first, second, msg=None)
Fail if the two objects are unequal as determined by the ==
operator.
assertEquals(first, second, msg=None)
Fail if the two objects are unequal as determined by the ==
operator.
assertFalse(expr, msg=None)
Fail the test if the expression is true.
assertNotAlmostEqual(first, second, places=7, msg=None)
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.
Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).
assertNotAlmostEquals(first, second, places=7, msg=None)
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.
Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).
assertNotEqual(first, second, msg=None)
Fail if the two objects are equal as determined by the ==
operator.
assertNotEquals(first, second, msg=None)
Fail if the two objects are equal as determined by the ==
operator.
assertRaises(excClass, callableObj, *args, **kwargs)
Fail unless an exception of class excClass is thrown by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is thrown, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception.
assertTrue(expr, msg=None)
Fail the test unless the expression is true.
assert_(expr, msg=None)
Fail the test unless the expression is true.
checkForBrokenLinks(body, path, basic=None)
Looks for broken links in a page by trying to traverse relative URIs.
commit()
countTestCases()
debug()
Run the test without collecting errors in a TestResult
defaultTestResult()
fail(msg=None)
Fail immediately, with the given message.
failIf(expr, msg=None)
Fail the test if the expression is true.
failIfAlmostEqual(first, second, places=7, msg=None)
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.
Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).
failIfEqual(first, second, msg=None)
Fail if the two objects are equal as determined by the ==
operator.
failUnless(expr, msg=None)
Fail the test unless the expression is true.
failUnlessAlmostEqual(first, second, places=7, msg=None)
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.
Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).
failUnlessEqual(first, second, msg=None)
Fail if the two objects are unequal as determined by the ==
operator.
failUnlessRaises(excClass, callableObj, *args, **kwargs)
Fail unless an exception of class excClass is thrown by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is thrown, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception.
getRootFolder()
Returns the Zope root folder.
getSite()
Returns the site which is used to look up local components
httpCookie(path)
Return self.cookies as an HTTP_COOKIE environment value.
id()
loadCookies(envstring)
makeRequest(path='', basic=None, form=None, env={})
Creates a new request object.
Arguments:
path -- the path to be traversed (e.g. "/folder1/index.html")
basic -- basic HTTP authentication credentials ("user:password")
form -- a dictionary emulating a form submission
(Note that field values should be Unicode strings)
env -- a dictionary of additional environment variables
(You can emulate HTTP request header
X-Header: foo
by adding 'HTTP_X_HEADER': foo
to env)
publish(path, basic=None, form=None, env={}, handle_errors=False)
Renders an object at a given location.
Arguments are the same as in makeRequest with the following exception: handle_errors -- if False (default), exceptions will not be caught if True, exceptions will return a formatted error page.
Returns the response object enhanced with the following methods: getOutput() -- returns the full HTTP output as a string getBody() -- returns the full response body as a string getPath() -- returns the path used in the request
run(result=None)
saveCookies(response)
Save cookies from the response.
setSite(site)
Set the site which will be used to look up local components
setUp()
Prepares for a functional test case.
shortDescription()
Returns a one-line description of the test, or None if no description has been provided.
The default implementation of this method returns the first line of the specified test method's docstring.
tearDown()
Cleans up after a functional test case.
testComponentLookupError()
There are no known subclasses.