From fde65270afb3855057a86b40c5996c86f58fe97b Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 30 Jul 2012 20:58:59 +1200 Subject: Testing examples and docs. --- libpathod/templates/docs_test.html | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'libpathod/templates/docs_test.html') diff --git a/libpathod/templates/docs_test.html b/libpathod/templates/docs_test.html index 27129f1c..c9162f87 100644 --- a/libpathod/templates/docs_test.html +++ b/libpathod/templates/docs_test.html @@ -6,4 +6,47 @@ Using pathod and pathoc in your unit tests. + +
+
+ +

The libpathod.test module is a light, flexible testing layer + for HTTP clients. It works by firing up a Pathod instance in a separate + thread, letting you use Pathod's full abilities to generate responses, + and then query Pathod's internal logs to establish what happened. All + the mechanics of startup, shutdown, finding free ports and so forth are + taken care of for you.

+ +

The canonical docs can be accessed using pydoc:

+ +
pydoc libpathod.testing
+ +

The remainder of this page demonstrates some common interaction + patterns using nose. These examples + are also applicable with only minor modification to most commonly used + Python testing engines.

+ +
+
+

Context Decorator

+ + {% include "examples_context.html" %} +
+
+ +
+
+

One instance per test

+ + {% include "examples_setup.html" %} +
+
+

One instance per suite

+ + {% include "examples_setupall.html" %} +
+
+ + {% endblock %} -- cgit v1.2.3