Package cherrypy :: Package test :: Module helper :: Class CPWebCase
[hide private]
[frames] | no frames]

Class CPWebCase

source code

            object --+        
                     |        
unittest.case.TestCase --+    
                         |    
           webtest.WebCase --+
                             |
                            CPWebCase
Known Subclasses:

Nested Classes [hide private]

Inherited from webtest.WebCase: HTTP_CONN

Inherited from unittest.case.TestCase: failureException

Instance Methods [hide private]
 
prefix(self) source code
 
base(self) source code
 
exit(self) source code
 
tearDown(self)
Hook method for deconstructing the test fixture after testing it.
source code
 
getPage(self, url, headers=None, method='GET', body=None, protocol=None)
Open the url.
source code
 
assertErrorPage(self, status, message=None, pattern='')
Compare the response body with a built in error page.
source code

Inherited from webtest.WebCase: __call__, assertBody, assertHeader, assertInBody, assertMatchesBody, assertNoHeader, assertNotInBody, assertStatus, interface, set_persistent

Inherited from unittest.case.TestCase: __eq__, __hash__, __init__, __ne__, __repr__, __str__, addCleanup, addTypeEqualityFunc, assertAlmostEqual, assertAlmostEquals, assertDictContainsSubset, assertDictEqual, assertEqual, assertEquals, assertFalse, assertGreater, assertGreaterEqual, assertIn, assertIs, assertIsInstance, assertIsNone, assertIsNot, assertIsNotNone, assertItemsEqual, assertLess, assertLessEqual, assertListEqual, assertMultiLineEqual, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertNotIn, assertNotIsInstance, assertNotRegexpMatches, assertRaises, assertRaisesRegexp, assertRegexpMatches, assertSequenceEqual, assertSetEqual, assertTrue, assertTupleEqual, assert_, countTestCases, debug, defaultTestResult, doCleanups, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, setUp, shortDescription, skipTest

Inherited from unittest.case.TestCase (private): _addSkip, _baseAssertEqual, _deprecate, _formatMessage, _getAssertEqualityFunc, _truncateMessage

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from unittest.case.TestCase: setUpClass, tearDownClass

Class Variables [hide private]
  script_name = ''
  scheme = "http"

Inherited from webtest.WebCase: HOST, PORT, PROTOCOL, body, console_height, headers, interactive, status, time, url

Inherited from unittest.case.TestCase: longMessage, maxDiff

Inherited from unittest.case.TestCase (private): _classSetupFailed, _diffThreshold

Properties [hide private]

Inherited from webtest.WebCase: persistent

Inherited from object: __class__

Method Details [hide private]

exit(self)

source code 
Overrides: webtest.WebCase.exit

tearDown(self)

source code 

Hook method for deconstructing the test fixture after testing it.

Overrides: unittest.case.TestCase.tearDown
(inherited documentation)

getPage(self, url, headers=None, method='GET', body=None, protocol=None)

source code 

Open the url. Return status, headers, body.

Overrides: webtest.WebCase.getPage

assertErrorPage(self, status, message=None, pattern='')

source code 

Compare the response body with a built in error page.

The function will optionally look for the regexp pattern, within the exception embedded in the error page.