Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@
Release Notes
=============

.. _Release Notes_1.0.6-12:

1.0.6-12
========

.. _Release Notes_1.0.6-12_Bug Fixes:

Bug Fixes
---------

- Type hinting for header_value_matcher has been fixed. From now, specifying a
callable as `Callable[[str, Optional[str], str], bool]` will be accepted
also. Providing a `HeaderValueMatcher` object will be also accepted as
before, as it provides the same callable signature.


.. _Release Notes_1.0.6:

1.0.6
Expand Down
17 changes: 4 additions & 13 deletions doc/background.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,15 @@ using the library is not complicated.

Example:

.. code-block:: python

def test_query_params(httpserver):
httpserver.expect_request("/foo", query_string={"user": "user1"}).respond_with_data(
"OK"
)
.. literalinclude :: ../tests/examples/test_example_query_params1.py
:language: python

It is simple in the most simple cases, but once the expectation is more
specific, the line can grow significantly, so here the user is expected to put
the literals into variables:

.. code-block:: python

def test_query_params(httpserver):
httpserver.expect_request("/foo", query_string=expected_query).respond_with_data(
"OK"
)

.. literalinclude :: ../tests/examples/test_example_query_params2.py
:language: python

If the user wants something more complex, classes are available for this which
can be instantiated and then specified for the parameters normally accepting
Expand Down
Loading