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]
 
test_gc(self) source code
 
prefix(self) source code
 
base(self) source code
 
exit(self) source code
 
getPage(self, url, headers=None, method='GET', body=None, protocol=None)
Open the url.
source code
 
skip(self, msg='skipped ') source code
 
assertErrorPage(self, status, message=None, pattern='')
Compare the response body with a built in error page.
source code
 
assertEqualDates(self, dt1, dt2, seconds=None)
Assert abs(dt1 - dt2) is within Y seconds.
source code

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

Inherited from unittest.case.TestCase: __call__, __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, tearDown

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]
 
_setup_server(cls, supervisor, conf) source code
 
setup_class(cls) source code
 
teardown_class(cls) source code

Inherited from unittest.case.TestCase: setUpClass, tearDownClass

Class Variables [hide private]
  script_name = ''
  scheme = "http"
  available_servers = {'wsgi': LocalWSGISupervisor, 'wsgi_u': ge...
  default_server = 'wsgi'
  do_gc_test = False
  date_tolerance = 2

Inherited from webtest.WebCase: HOST, PORT, PROTOCOL, body, console_height, encoding, 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

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.


Class Variable Details [hide private]

available_servers

Value:
{'wsgi': LocalWSGISupervisor, 'wsgi_u': get_wsgi_u_supervisor, 'native\
': NativeServerSupervisor, 'cpmodpy': get_cpmodpy_supervisor, 'modpygw\
': get_modpygw_supervisor, 'modwsgi': get_modwsgi_supervisor, 'modfcgi\
d': get_modfcgid_supervisor, 'modfastcgi': get_modfastcgi_supervisor,}