class documentation

Tests for Plating.

Method get Issue a virtual GET request to the given path that is expected to succeed synchronously, and return the generated request object and written bytes.
Method setUp Create an app and a resource wrapping that app for this test.
Method test_missing_renderer Missing renderers will result in an exception during rendering.
Method test_presentation_only_json Slots marked as "presentation only" will not be reflected in the output.
Method test_prime_directive_arguments ... or shall require the function to modify its signature under these Articles Of Federation.
Method test_prime_directive_return Nothing within these Articles Of Federation shall authorize the United Federation of Planets to alter the return value of a callable by applying a decorator to it...
Method test_render_list The :list renderer suffix will render the slot named by the renderer as a list, filling each slot.
Method test_renderMethod Plating.renderMethod registers a renderer that may be used by the Plating's template.
Method test_selfhood Rendering a Plating.routed decorated route on a method still results in the decorated method receiving the appropriate self.
Method test_template_html Rendering a Plating.routed decorated route results in templated HTML.
Method test_template_json Rendering a Plating.routed decorated route with a query parameter asking for JSON will yield JSON instead.
Method test_template_json_contains_deferred Rendering a Plating.routed decorated route with a query parameter asking for JSON waits until the Deferreds returned by the route have fired.
Method test_template_numbers Data returned from a plated method may include numeric types (integers, floats, and possibly longs), which although they are not normally serializable by twisted.web.template, will be converted by plating into their decimal representation.
Method test_widget_function A function decorated with Plating.wigeted can be directly invoked.
Method test_widget_html When Plating.widgeted is applied as a decorator, it gives the decorated function a widget attribute which is a version of the function with a modified return type that turns it into a renderable HTML sub-element that may fill a slot.
Method test_widget_json When Plating.widgeted is applied as a decorator, and the result is serialized to JSON, it appears the same as the returned value despite the HTML-friendly wrapping described above.
Method test_widget_json_deferred When Plating.widgeted is applied as a decorator, and the result is serialized to JSON, it appears the same as the returned value despite the HTML-friendly wrapping described above.
Instance Variable app Undocumented
Instance Variable kr Undocumented
def get(self, uri): (source)

Issue a virtual GET request to the given path that is expected to succeed synchronously, and return the generated request object and written bytes.

def setUp(self): (source)

Create an app and a resource wrapping that app for this test.

def test_missing_renderer(self): (source)

Missing renderers will result in an exception during rendering.

def test_presentation_only_json(self): (source)

Slots marked as "presentation only" will not be reflected in the output.

def test_prime_directive_arguments(self): (source)

... or shall require the function to modify its signature under these Articles Of Federation.

def test_prime_directive_return(self): (source)

Nothing within these Articles Of Federation shall authorize the United Federation of Planets to alter the return value of a callable by applying a decorator to it...

def test_render_list(self): (source)

The :list renderer suffix will render the slot named by the renderer as a list, filling each slot.

def test_renderMethod(self): (source)

Plating.renderMethod registers a renderer that may be used by the Plating's template.

def test_selfhood(self): (source)

Rendering a Plating.routed decorated route on a method still results in the decorated method receiving the appropriate self.

def test_template_html(self): (source)

Rendering a Plating.routed decorated route results in templated HTML.

def test_template_json(self): (source)

Rendering a Plating.routed decorated route with a query parameter asking for JSON will yield JSON instead.

def test_template_json_contains_deferred(self): (source)

Rendering a Plating.routed decorated route with a query parameter asking for JSON waits until the Deferreds returned by the route have fired.

def test_template_numbers(self): (source)

Data returned from a plated method may include numeric types (integers, floats, and possibly longs), which although they are not normally serializable by twisted.web.template, will be converted by plating into their decimal representation.

def test_widget_function(self): (source)

A function decorated with Plating.wigeted can be directly invoked.

def test_widget_html(self): (source)

When Plating.widgeted is applied as a decorator, it gives the decorated function a widget attribute which is a version of the function with a modified return type that turns it into a renderable HTML sub-element that may fill a slot.

def test_widget_json(self): (source)

When Plating.widgeted is applied as a decorator, and the result is serialized to JSON, it appears the same as the returned value despite the HTML-friendly wrapping described above.

def test_widget_json_deferred(self): (source)

When Plating.widgeted is applied as a decorator, and the result is serialized to JSON, it appears the same as the returned value despite the HTML-friendly wrapping described above.

Undocumented

Undocumented