Home Trees Indices Help
lxml API
Package lxml :: Package tests :: Module dummy_http_server
[]

Module dummy_http_server

source code

Simple HTTP request dumper for tests.
Classes [hide private]
WebServer
A web server that starts a new thread for each request. _RequestHandler HTTPRequestCollector
Functions [hide private]
webserver(*args, **kwds)
Context manager entry point for the 'with' statement. source code
build_web_server(app, port, host=None) source code
Variables [hide private]
__package__ = 'lxml.tests'
Function Details [hide private]

webserver(*args, **kwds)

source code

Context manager entry point for the 'with' statement.

Pass 0 as port number to dynamically allocate a free port.

Usage:

with webserver(wsgi_app_function, 8080) as host_url:
do_ws_calls(host_url)
Decorators:
  • @contextmanager

Home Trees Indices Help
lxml API
Generated by Epydoc 3.0.1 on Thu Jul 9 18:29:53 2020 http://epydoc.sourceforge.net

AltStyle によって変換されたページ (->オリジナル) /