Release Notes¶
0.3.0¶
New Features¶
- Support ephemeral port. This can be used by specify 0 as the port number to the HTTPServer instance. In such case, an unused port will be picked up and the server will start listening on that port. Querying the port attribute after server start reveals the real port where the server is actually listening.
- Unify request functions of the HTTPServer class to make the API more straightforward to use.
Upgrade Notes¶
- The default port has been changed to 0, which results that the server will be staring on an ephemeral port.
- The following methods of HTTPServer have been changed in a backward-incompatible way:
pytest_httpserver.HTTPServer.expect_request()
becomes a general function accepting handler_type parameter so it can create any kind of request handlerspytest_httpserver.HTTPServer.expect_oneshot_request()
no longer accepts the ordered parameter, and it creates an unordered oneshot request handlerpytest_httpserver.HTTPServer.expect_ordered_request()
is a new method craeting an ordered request handler
0.2.2¶
New Features¶
- Make it possible to intelligently compare headers. To accomplish that HeaderValueMatcher was added. It already contains logic to compare unknown headers and authorization headers. Patch by Roman Inflianskas.
0.2.1¶
Prelude¶
Minor fixes in setup.py and build environment. No actual code change in library .py files.
0.2¶
New Features¶
- When using pytest plugin, specifying the bind address and bind port can also be possible via environment variables. Setting PYTEST_HTTPSERVER_HOST and PYTEST_HTTPSERVER_PORT will change the bind host and bind port, respectively.
- SSL/TLS support added with using the SSL/TLS support provided by werkzeug. This is based on the ssl module from the standard library.