Trestle

Doctest for ReST(ful services)
Download

Trestle Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Jason Pellerin
  • Publisher web site:
  • http://somethingaboutorange.com/

Trestle Tags


Trestle Description

Doctest for ReST(ful services) Trestle is a plugin for nose that enables you to write testable documentation for web apps (or shell commands, but more on that later).To use trestle, write a reStructured Text document (like this one) using a set of special directives to indicate the fixtures to be used for testing (including the http or mock http client), each request to be sent via the client, and the expected response from the application under test.A simple trestle test document might look like this:Frog: A web service for doing things with frogs-----------------------------------------------.. fixtures :: frog_fixturesFrog is a web service for doing things with frogs.You can list the available frogs... request :: List available frogs GET /frogs..The response is in a plain-text format... response :: bullfrog poison dart treefrog .....You can find out if something is a frog... request :: Get bullfrog details GET /frogs/bullfrog..If the requested term is a frog, details about the frog will be returned... response :: Bullfrogs are really big frogs...Otherwise, a 404 response is returned... request :: Get details for a non-frog GET /frogs/toad.... response :: 404 ... ... "toad" is not a frog...You can create frogs... request :: Create a frog POST /frogs/pouched+frog A pouched frog camouflages itself to look like dead leaves..... response :: 201 Created ... ..... Requirements: · Python


Trestle Related Software