aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/templates/docs_test.html
blob: 25205d41ebbc0703672ce57eb0efeb6823a9b621 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{% extends "docframe.html" %}
{% block body %}  
<div class="page-header">
   <h1>
        libpathod.test
        <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.test</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 Manager </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 %}