cherrypy.test.test_core module

Basic tests for the CherryPy core: request handling.

class cherrypy.test.test_core.CoreRequestHandlingTest(methodName='runTest')[source]

Bases: cherrypy.test.helper.CPWebCase

static setup_server()[source]
skip_if_bad_cookies()[source]

cookies module fails to reject invalid cookies https://github.com/cherrypy/cherrypy/issues/1405

testCookies()[source]
testDefaultContentType()[source]
testFavicon()[source]
testFlatten()[source]
testRanges()[source]
testRedirect()[source]
testSlashes()[source]
testStatus()[source]
test_InternalRedirect()[source]
test_cherrypy_url()[source]
test_expose_decorator()[source]
test_multiple_headers()[source]
test_on_end_resource_status()[source]
test_redirect_with_unicode()[source]

A redirect to a URL with Unicode should return a Location header containing that Unicode URL.

test_redirect_with_xss()[source]

A redirect to a URL with HTML injected should result in page contents escaped.

class cherrypy.test.test_core.ErrorTests(methodName='runTest')[source]

Bases: cherrypy.test.helper.CPWebCase

static setup_server()[source]
test_contextmanager()[source]
test_start_response_error()[source]
class cherrypy.test.test_core.TestBinding[source]

Bases: object

test_bind_ephemeral_port()[source]

A server configured to bind to port 0 will bind to an ephemeral port and indicate that port number on startup.