# cherrypy.test.test_core module

Basic tests for the CherryPy core: request handling.

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

  Bases: `CPWebCase`

  _classSetupFailed = False
  _class_cleanups = []
  static setup_server()
  skip_if_bad_cookies()

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

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

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

  test_redirect_with_xss()

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

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

  Bases: `CPWebCase`

  _classSetupFailed = False
  _class_cleanups = []
  static setup_server()
  test_contextmanager()
  test_start_response_error()

class cherrypy.test.test_core.TestBinding

  Bases: `object`

  test_bind_ephemeral_port()

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