bce66a677016407458db3ee60427eaf5f8f2f55a
[platform/upstream/python-lxml.git] / doc / html / api / lxml.tests.dummy_http_server-module.html
1 <?xml version="1.0" encoding="ascii"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3           "DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 <head>
6   <title>lxml.tests.dummy_http_server</title>
7   <link rel="stylesheet" href="epydoc.css" type="text/css" />
8   <script type="text/javascript" src="epydoc.js"></script>
9 </head>
10
11 <body bgcolor="white" text="black" link="blue" vlink="#204080"
12       alink="#204080">
13 <!-- ==================== NAVIGATION BAR ==================== -->
14 <table class="navbar" border="0" width="100%" cellpadding="0"
15        bgcolor="#a0c0ff" cellspacing="0">
16   <tr valign="middle">
17   <!-- Home link -->
18       <th>&nbsp;&nbsp;&nbsp;<a
19         href="lxml-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
20
21   <!-- Tree link -->
22       <th>&nbsp;&nbsp;&nbsp;<a
23         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
24
25   <!-- Index link -->
26       <th>&nbsp;&nbsp;&nbsp;<a
27         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
28
29   <!-- Help link -->
30       <th>&nbsp;&nbsp;&nbsp;<a
31         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
32
33   <!-- Project homepage -->
34       <th class="navbar" align="right" width="100%">
35         <table border="0" cellpadding="0" cellspacing="0">
36           <tr><th class="navbar" align="center"
37             ><a class="navbar" target="_top" href="/">lxml API</a></th>
38           </tr></table></th>
39   </tr>
40 </table>
41 <table width="100%" cellpadding="0" cellspacing="0">
42   <tr valign="top">
43     <td width="100%">
44       <span class="breadcrumbs">
45         <a href="lxml-module.html">Package&nbsp;lxml</a> ::
46         <a href="lxml.tests-module.html">Package&nbsp;tests</a> ::
47         Module&nbsp;dummy_http_server
48       </span>
49     </td>
50     <td>
51       <table cellpadding="0" cellspacing="0">
52         <!-- hide/show private -->
53         <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
54     onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
55         <tr><td align="right"><span class="options"
56             >[<a href="frames.html" target="_top">frames</a
57             >]&nbsp;|&nbsp;<a href="lxml.tests.dummy_http_server-module.html"
58             target="_top">no&nbsp;frames</a>]</span></td></tr>
59       </table>
60     </td>
61   </tr>
62 </table>
63 <!-- ==================== MODULE DESCRIPTION ==================== -->
64 <h1 class="epydoc">Module dummy_http_server</h1><p class="nomargin-top"><span class="codelink"><a href="lxml.tests.dummy_http_server-pysrc.html">source&nbsp;code</a></span></p>
65 Simple HTTP request dumper for tests.
66
67 <!-- ==================== CLASSES ==================== -->
68 <a name="section-Classes"></a>
69 <table class="summary" border="1" cellpadding="3"
70        cellspacing="0" width="100%" bgcolor="white">
71 <tr bgcolor="#70b0f0" class="table-header">
72   <td colspan="2" class="table-header">
73     <table border="0" cellpadding="0" cellspacing="0" width="100%">
74       <tr valign="top">
75         <td align="left"><span class="table-header">Classes</span></td>
76         <td align="right" valign="top"
77          ><span class="options">[<a href="#section-Classes"
78          class="privatelink" onclick="toggle_private();"
79          >hide private</a>]</span></td>
80       </tr>
81     </table>
82   </td>
83 </tr>
84 <tr>
85     <td width="15%" align="right" valign="top" class="summary">
86       <span class="summary-type">&nbsp;</span>
87     </td><td class="summary">
88         <a href="lxml.tests.dummy_http_server.WebServer-class.html" class="summary-name">WebServer</a><br />
89       A web server that starts a new thread for each request.
90     </td>
91   </tr>
92 <tr class="private">
93     <td width="15%" align="right" valign="top" class="summary">
94       <span class="summary-type">&nbsp;</span>
95     </td><td class="summary">
96         <a href="lxml.tests.dummy_http_server._RequestHandler-class.html" class="summary-name" onclick="show_private();">_RequestHandler</a>
97     </td>
98   </tr>
99 <tr>
100     <td width="15%" align="right" valign="top" class="summary">
101       <span class="summary-type">&nbsp;</span>
102     </td><td class="summary">
103         <a href="lxml.tests.dummy_http_server.HTTPRequestCollector-class.html" class="summary-name">HTTPRequestCollector</a>
104     </td>
105   </tr>
106 </table>
107 <!-- ==================== FUNCTIONS ==================== -->
108 <a name="section-Functions"></a>
109 <table class="summary" border="1" cellpadding="3"
110        cellspacing="0" width="100%" bgcolor="white">
111 <tr bgcolor="#70b0f0" class="table-header">
112   <td colspan="2" class="table-header">
113     <table border="0" cellpadding="0" cellspacing="0" width="100%">
114       <tr valign="top">
115         <td align="left"><span class="table-header">Functions</span></td>
116         <td align="right" valign="top"
117          ><span class="options">[<a href="#section-Functions"
118          class="privatelink" onclick="toggle_private();"
119          >hide private</a>]</span></td>
120       </tr>
121     </table>
122   </td>
123 </tr>
124 <tr>
125     <td width="15%" align="right" valign="top" class="summary">
126       <span class="summary-type">&nbsp;</span>
127     </td><td class="summary">
128       <table width="100%" cellpadding="0" cellspacing="0" border="0">
129         <tr>
130           <td><span class="summary-sig"><a href="lxml.tests.dummy_http_server-module.html#webserver" class="summary-sig-name">webserver</a>(<span class="summary-sig-arg">*args</span>,
131         <span class="summary-sig-arg">**kwds</span>)</span><br />
132       Context manager entry point for the 'with' statement.</td>
133           <td align="right" valign="top">
134             <span class="codelink"><a href="lxml.tests.dummy_http_server-pysrc.html#webserver">source&nbsp;code</a></span>
135             
136           </td>
137         </tr>
138       </table>
139       
140     </td>
141   </tr>
142 <tr>
143     <td width="15%" align="right" valign="top" class="summary">
144       <span class="summary-type">&nbsp;</span>
145     </td><td class="summary">
146       <table width="100%" cellpadding="0" cellspacing="0" border="0">
147         <tr>
148           <td><span class="summary-sig"><a name="build_web_server"></a><span class="summary-sig-name">build_web_server</span>(<span class="summary-sig-arg">app</span>,
149         <span class="summary-sig-arg">port</span>,
150         <span class="summary-sig-arg">host</span>=<span class="summary-sig-default">None</span>)</span></td>
151           <td align="right" valign="top">
152             <span class="codelink"><a href="lxml.tests.dummy_http_server-pysrc.html#build_web_server">source&nbsp;code</a></span>
153             
154           </td>
155         </tr>
156       </table>
157       
158     </td>
159   </tr>
160 </table>
161 <!-- ==================== VARIABLES ==================== -->
162 <a name="section-Variables"></a>
163 <table class="summary" border="1" cellpadding="3"
164        cellspacing="0" width="100%" bgcolor="white">
165 <tr bgcolor="#70b0f0" class="table-header">
166   <td colspan="2" class="table-header">
167     <table border="0" cellpadding="0" cellspacing="0" width="100%">
168       <tr valign="top">
169         <td align="left"><span class="table-header">Variables</span></td>
170         <td align="right" valign="top"
171          ><span class="options">[<a href="#section-Variables"
172          class="privatelink" onclick="toggle_private();"
173          >hide private</a>]</span></td>
174       </tr>
175     </table>
176   </td>
177 </tr>
178 <tr>
179     <td width="15%" align="right" valign="top" class="summary">
180       <span class="summary-type">&nbsp;</span>
181     </td><td class="summary">
182         <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'lxml.tests'"><code class="variable-quote">'</code><code class="variable-string">lxml.tests</code><code class="variable-quote">'</code></code>
183     </td>
184   </tr>
185 </table>
186 <!-- ==================== FUNCTION DETAILS ==================== -->
187 <a name="section-FunctionDetails"></a>
188 <table class="details" border="1" cellpadding="3"
189        cellspacing="0" width="100%" bgcolor="white">
190 <tr bgcolor="#70b0f0" class="table-header">
191   <td colspan="2" class="table-header">
192     <table border="0" cellpadding="0" cellspacing="0" width="100%">
193       <tr valign="top">
194         <td align="left"><span class="table-header">Function Details</span></td>
195         <td align="right" valign="top"
196          ><span class="options">[<a href="#section-FunctionDetails"
197          class="privatelink" onclick="toggle_private();"
198          >hide private</a>]</span></td>
199       </tr>
200     </table>
201   </td>
202 </tr>
203 </table>
204 <a name="webserver"></a>
205 <div>
206 <table class="details" border="1" cellpadding="3"
207        cellspacing="0" width="100%" bgcolor="white">
208 <tr><td>
209   <table width="100%" cellpadding="0" cellspacing="0" border="0">
210   <tr valign="top"><td>
211   <h3 class="epydoc"><span class="sig"><span class="sig-name">webserver</span>(<span class="sig-arg">*args</span>,
212         <span class="sig-arg">**kwds</span>)</span>
213   </h3>
214   </td><td align="right" valign="top"
215     ><span class="codelink"><a href="lxml.tests.dummy_http_server-pysrc.html#webserver">source&nbsp;code</a></span>&nbsp;
216     </td>
217   </tr></table>
218   
219   <p>Context manager entry point for the 'with' statement.</p>
220 <p>Pass 0 as port number to dynamically allocate a free port.</p>
221 <p>Usage:</p>
222 <dl class="rst-docutils">
223 <dt>with webserver(wsgi_app_function, 8080) as host_url:</dt>
224 <dd>do_ws_calls(host_url)</dd>
225 </dl>
226   <dl class="fields">
227     <dt>Decorators:</dt>
228     <dd><ul class="nomargin-top">
229         <li><code>@contextmanager</code></li>
230     </ul></dd>
231   </dl>
232 </td></tr></table>
233 </div>
234 <br />
235 <!-- ==================== NAVIGATION BAR ==================== -->
236 <table class="navbar" border="0" width="100%" cellpadding="0"
237        bgcolor="#a0c0ff" cellspacing="0">
238   <tr valign="middle">
239   <!-- Home link -->
240       <th>&nbsp;&nbsp;&nbsp;<a
241         href="lxml-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
242
243   <!-- Tree link -->
244       <th>&nbsp;&nbsp;&nbsp;<a
245         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
246
247   <!-- Index link -->
248       <th>&nbsp;&nbsp;&nbsp;<a
249         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
250
251   <!-- Help link -->
252       <th>&nbsp;&nbsp;&nbsp;<a
253         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
254
255   <!-- Project homepage -->
256       <th class="navbar" align="right" width="100%">
257         <table border="0" cellpadding="0" cellspacing="0">
258           <tr><th class="navbar" align="center"
259             ><a class="navbar" target="_top" href="/">lxml API</a></th>
260           </tr></table></th>
261   </tr>
262 </table>
263 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
264   <tr>
265     <td align="left" class="footer">
266     Generated by Epydoc 3.0.1
267     on Wed Jan 29 12:26:21 2020
268     </td>
269     <td align="right" class="footer">
270       <a target="mainFrame" href="http://epydoc.sourceforge.net"
271         >http://epydoc.sourceforge.net</a>
272     </td>
273   </tr>
274 </table>
275
276 <script type="text/javascript">
277   <!--
278   // Private objects are initially displayed (because if
279   // javascript is turned off then we want them to be
280   // visible); but by default, we want to hide them.  So hide
281   // them unless we have a cookie that says to show them.
282   checkCookie();
283   // -->
284 </script>
285 </body>
286 </html>