diff options
| author | Aldo Cortesi <aldo@nullcube.com> | 2012-07-30 20:58:59 +1200 |
|---|---|---|
| committer | Aldo Cortesi <aldo@nullcube.com> | 2012-07-30 20:58:59 +1200 |
| commit | fde65270afb3855057a86b40c5996c86f58fe97b (patch) | |
| tree | dad83bd28cdfa36178560b7bcb7832d92c7a14c8 /libpathod/templates/docs_test.html | |
| parent | e52a37ffa962f662cfcab8056c8af5b0ac9f416b (diff) | |
| download | mitmproxy-fde65270afb3855057a86b40c5996c86f58fe97b.tar.gz mitmproxy-fde65270afb3855057a86b40c5996c86f58fe97b.tar.bz2 mitmproxy-fde65270afb3855057a86b40c5996c86f58fe97b.zip | |
Testing examples and docs.
Diffstat (limited to 'libpathod/templates/docs_test.html')
| -rw-r--r-- | libpathod/templates/docs_test.html | 43 |
1 files changed, 43 insertions, 0 deletions
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 @@ <small>Using pathod and pathoc in your unit tests.</small> </h1> </div> + +<div class="row"> + <div class="span6"> + + <p> The <b>libpathod.test</b> 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. </p> + + <p> The canonical docs can be accessed using pydoc: </p> + + <pre class="terminal">pydoc libpathod.testing</pre> + + <p> The remainder of this page demonstrates some common interaction + patterns using <a + href="http://nose.readthedocs.org/en/latest/">nose</a>. These examples + are also applicable with only minor modification to most commonly used + Python testing engines.</p> + + </div> + <div class="span6"> + <h1> Context Decorator </h1> + + {% include "examples_context.html" %} + </div> +</div> + +<div class="row"> + <div class="span6"> + <h1> One instance per test </h1> + + {% include "examples_setup.html" %} + </div> + <div class="span6"> + <h1> One instance per suite </h1> + + {% include "examples_setupall.html" %} + </div> +</div> + + {% endblock %} |
