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">
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>
11 <body bgcolor="white" text="black" link="blue" vlink="#204080"
13 <!-- ==================== NAVIGATION BAR ==================== -->
14 <table class="navbar" border="0" width="100%" cellpadding="0"
15 bgcolor="#a0c0ff" cellspacing="0">
18 <th> <a
19 href="lxml-module.html">Home</a> </th>
22 <th> <a
23 href="module-tree.html">Trees</a> </th>
26 <th> <a
27 href="identifier-index.html">Indices</a> </th>
30 <th> <a
31 href="help.html">Help</a> </th>
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>
41 <table width="100%" cellpadding="0" cellspacing="0">
44 <span class="breadcrumbs">
45 <a href="lxml-module.html">Package lxml</a> ::
46 <a href="lxml.tests-module.html">Package tests</a> ::
47 Module dummy_http_server
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 private</a>]</span></td></tr>
55 <tr><td align="right"><span class="options"
56 >[<a href="frames.html" target="_top">frames</a
57 >] | <a href="lxml.tests.dummy_http_server-module.html"
58 target="_top">no frames</a>]</span></td></tr>
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 code</a></span></p>
65 Simple HTTP request dumper for tests.
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%">
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>
85 <td width="15%" align="right" valign="top" class="summary">
86 <span class="summary-type"> </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.
93 <td width="15%" align="right" valign="top" class="summary">
94 <span class="summary-type"> </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>
100 <td width="15%" align="right" valign="top" class="summary">
101 <span class="summary-type"> </span>
102 </td><td class="summary">
103 <a href="lxml.tests.dummy_http_server.HTTPRequestCollector-class.html" class="summary-name">HTTPRequestCollector</a>
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%">
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>
125 <td width="15%" align="right" valign="top" class="summary">
126 <span class="summary-type"> </span>
127 </td><td class="summary">
128 <table width="100%" cellpadding="0" cellspacing="0" border="0">
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 code</a></span>
143 <td width="15%" align="right" valign="top" class="summary">
144 <span class="summary-type"> </span>
145 </td><td class="summary">
146 <table width="100%" cellpadding="0" cellspacing="0" border="0">
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 code</a></span>
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%">
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>
179 <td width="15%" align="right" valign="top" class="summary">
180 <span class="summary-type"> </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>
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%">
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>
204 <a name="webserver"></a>
206 <table class="details" border="1" cellpadding="3"
207 cellspacing="0" width="100%" bgcolor="white">
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>
214 </td><td align="right" valign="top"
215 ><span class="codelink"><a href="lxml.tests.dummy_http_server-pysrc.html#webserver">source code</a></span>
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>
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>
228 <dd><ul class="nomargin-top">
229 <li><code>@contextmanager</code></li>
235 <!-- ==================== NAVIGATION BAR ==================== -->
236 <table class="navbar" border="0" width="100%" cellpadding="0"
237 bgcolor="#a0c0ff" cellspacing="0">
240 <th> <a
241 href="lxml-module.html">Home</a> </th>
244 <th> <a
245 href="module-tree.html">Trees</a> </th>
248 <th> <a
249 href="identifier-index.html">Indices</a> </th>
252 <th> <a
253 href="help.html">Help</a> </th>
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>
263 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
265 <td align="left" class="footer">
266 Generated by Epydoc 3.0.1
267 on Wed Jan 29 12:26:21 2020
269 <td align="right" class="footer">
270 <a target="mainFrame" href="http://epydoc.sourceforge.net"
271 >http://epydoc.sourceforge.net</a>
276 <script type="text/javascript">
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.