class documentation

class KleinResourceTests(SynchronousTestCase): (source)

View In Hierarchy

Undocumented

Method assertFired Assert that the given deferred has fired with the given result.
Method assertNotFired Assert that the given deferred has not fired with a result.
Method setUp Undocumented
Method test_addSlash Undocumented
Method test_asyncRendering Undocumented
Method test_branchRendering Undocumented
Method test_branchWithExplicitChildBranch Undocumented
Method test_branchWithExplicitChildrenRouting Undocumented
Method test_cancelledDeferred Undocumented
Method test_cancelledIsEatenOnConnectionLost Undocumented
Method test_cancelsOnConnectionLost Undocumented
Method test_childrenResourceRendering Undocumented
Method test_childResourceRendering Undocumented
Method test_correctContentLengthForRequestRedirect Undocumented
Method test_decodesPath server_name, path_info, and script_name are decoded as UTF-8 before being handed to werkzeug.
Method test_deferredElementRendering Undocumented
Method test_deferredRendering Undocumented
Method test_elementRendering Undocumented
Method test_ensure_utf8_bytes Undocumented
Method test_errorHandlerNeedsRendering Renderables returned by handle_errors are rendered.
Method test_errorHandlerReturnsResource Resources returned by Klein.handle_errors are rendered
Method test_explicitStaticBranch Undocumented
Method test_external_url_for Undocumented
Method test_failedDecodePathInfo If decoding of one of the URL parts (in this case PATH_INFO) fails, the error is logged and 400 returned.
Method test_genericErrorHandler Undocumented
Method test_handlerRaises Undocumented
Method test_leafResourceRendering Undocumented
Method test_methodNotAllowed Undocumented
Method test_methodNotAllowedWithRootCollection Undocumented
Method test_noImplicitBranch Undocumented
Method test_notFound Undocumented
Method test_notFoundException Undocumented
Method test_producerResourceRendering Test that Klein will correctly handle producing Resources.
Method test_renderNone Undocumented
Method test_renderUnicode Undocumented
Method test_requestFinishAfterConnectionLost Undocumented
Method test_requestWriteAfterFinish Undocumented
Method test_routeHandlesRequestFinished Undocumented
Method test_simplePost Undocumented
Method test_simpleRouting Undocumented
Method test_staticDirlist Undocumented
Method test_staticRoot Undocumented
Method test_strictSlashes Undocumented
Method test_subroutedBranch Undocumented
Method test_typeSpecificErrorHandlers Undocumented
Method test_url_for Undocumented
Method test_urlDecodeErrorRepr URLDecodeError.__repr__ formats properly.
Method test_URLPath Undocumented
Method test_URLPath_root Undocumented
Method test_URLPath_traversedResource Undocumented
Instance Variable app Undocumented
Instance Variable kr Undocumented
def assertFired(self, deferred, result=None): (source)

Assert that the given deferred has fired with the given result.

Parameters
deferred:DeferredUndocumented
result:objectUndocumented
def assertNotFired(self, deferred): (source)

Assert that the given deferred has not fired with a result.

Parameters
deferred:DeferredUndocumented
def setUp(self): (source)

Undocumented

def test_addSlash(self): (source)

Undocumented

def test_asyncRendering(self): (source)

Undocumented

def test_branchRendering(self): (source)

Undocumented

def test_branchWithExplicitChildBranch(self): (source)

Undocumented

def test_branchWithExplicitChildrenRouting(self): (source)

Undocumented

def test_cancelledDeferred(self): (source)

Undocumented

def test_cancelledIsEatenOnConnectionLost(self): (source)

Undocumented

def test_cancelsOnConnectionLost(self): (source)

Undocumented

def test_childrenResourceRendering(self): (source)

Undocumented

def test_childResourceRendering(self): (source)

Undocumented

def test_correctContentLengthForRequestRedirect(self): (source)

Undocumented

def test_decodesPath(self): (source)

server_name, path_info, and script_name are decoded as UTF-8 before being handed to werkzeug.

def test_deferredElementRendering(self): (source)

Undocumented

def test_deferredRendering(self): (source)

Undocumented

def test_elementRendering(self): (source)

Undocumented

def test_ensure_utf8_bytes(self): (source)

Undocumented

def test_errorHandlerNeedsRendering(self): (source)

Renderables returned by handle_errors are rendered.

def test_errorHandlerReturnsResource(self): (source)

Resources returned by Klein.handle_errors are rendered

def test_explicitStaticBranch(self): (source)

Undocumented

def test_external_url_for(self): (source)

Undocumented

def test_failedDecodePathInfo(self): (source)

If decoding of one of the URL parts (in this case PATH_INFO) fails, the error is logged and 400 returned.

def test_genericErrorHandler(self): (source)

Undocumented

def test_handlerRaises(self): (source)

Undocumented

def test_leafResourceRendering(self): (source)

Undocumented

def test_methodNotAllowed(self): (source)

Undocumented

def test_methodNotAllowedWithRootCollection(self): (source)

Undocumented

def test_noImplicitBranch(self): (source)

Undocumented

def test_notFound(self): (source)

Undocumented

def test_notFoundException(self): (source)

Undocumented

def test_producerResourceRendering(self): (source)

Test that Klein will correctly handle producing Resources.

Producing Resources close the connection by themselves, sometimes after Klein has 'finished'. This test lets Klein finish its handling of the request before doing more producing.

def test_renderNone(self): (source)

Undocumented

def test_renderUnicode(self): (source)

Undocumented

def test_requestFinishAfterConnectionLost(self): (source)

Undocumented

def test_requestWriteAfterFinish(self): (source)

Undocumented

def test_routeHandlesRequestFinished(self): (source)

Undocumented

def test_simplePost(self): (source)

Undocumented

def test_simpleRouting(self): (source)

Undocumented

def test_staticDirlist(self): (source)

Undocumented

def test_staticRoot(self): (source)

Undocumented

def test_strictSlashes(self): (source)

Undocumented

def test_subroutedBranch(self): (source)

Undocumented

def test_typeSpecificErrorHandlers(self): (source)

Undocumented

def test_url_for(self): (source)

Undocumented

def test_urlDecodeErrorRepr(self): (source)

URLDecodeError.__repr__ formats properly.

def test_URLPath(self): (source)

Undocumented

def test_URLPath_root(self): (source)

Undocumented

def test_URLPath_traversedResource(self): (source)

Undocumented

Undocumented

Undocumented