mocking and expectations made easy in Python. Heavily inspired by
2024-12-26 22:48:31 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-pook: updated to 2.1.3
2.1.3
Ensure aiohttp headers matchable from both session and request
|
2024-11-21 07:00:22 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-pook: updated to 2.1.2
2.1.2
Return the correct type of headers object for standard library urllib
Support Sequence[tuple[str, str]] header input with aiohttp
Fix network filters when multiple filters are active
Fix aiohttp matching not working with session base URL or headers
Add support for Python 3.13
|
2024-10-19 07:56:24 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-pook: updated to 2.1.1
2.1.1
Flush mocks when pook.activate used as a wrapper
This prevents mocks from leaking between test cases and should fix some \
potentially confusing edge case bugs.
|
2024-10-14 19:05:00 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-pook: updated to 2.1.0
2.1.0
Drop support for Python 3.8
|
2024-08-28 17:23:11 by Adam Ciarcinski | Files touched by this commit (3) | |
Log message:
py-pook: updated to 2.0.0
v2.0.0
Breaking change: Remove Response::body's binary parameter and enforce a keyword \
argument for chunked.
The binary parameter is no longer needed since responses are now always \
byte-encoded in all cases (see below).
A keyword argument is now enforced for chunked to ensure unnamed arguments meant \
for the removed binary parameter cannot be confused as chunked arguments.
Only return byte-encoded response bodies, matching the bahviour of all supported \
client libraries.
This is possible because for all supported client libraries, pook mocks the \
actual response sent to the
client library over the wire, which will, in all cases, be bytes. Client \
libraries that support reading
response content as a string or other formats will continue to work as expected, \
because they'll always
be handling bytes from pook.
This causes no change to application code for users of pook, except for users of \
the standard library urllib,
for which this also fixed a bug where non-bytes bodies were returned by pook in \
certain cases. This is impossible
in real application code. If you rely on pook to mock urllib responses and have \
code that handles non-bytes response
bodies, that code can be safely deleted (provided the only reason it was there \
was pook in the first place).
Breaking change: Remove Mock::body's binary parameter.
This parameter was already unused due to a bug in the code (it was not passed \
through to the BodyMatcher),
so this will not cause any changes to tests that relied on it: it didn't do \
anything to begin with.
The breaking change is simply the removal of the unused parameter, which should \
be deleted from tests using pook.
Pook's code has also been updated to remove all cases where non-bytes objects \
were being handled. Instead, the body
of any interecepted request will always be stored as bytes, and only decoded \
when necessary for individual downstream
matchers (JSON, XML).
Correct documentation strings for XMLMatcher and JSONMatcher to no longer \
suggest they can handle regex matchers.
These classes never implemented regex matching.
Add a pytest fixture to the package (kudos @wimglenn)
|
2024-02-23 08:54:16 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-pook: updated to 1.4.3
v1.4.3 / 2024-02-23
Fix httpx incorrectly named method on interceptor subclass
v1.4.2 / 2024-02-15
fix: httpx streaming via iter_raw raises httpx.StreamConsumed
v1.4.1 / 2024-02-12
Fix Mock constructor params/url order mishandling
Optionally match empty values in query parameter presence matcher
Fix httpx network mode
|
2024-01-14 16:34:05 by Adam Ciarcinski | Files touched by this commit (3) | |
Log message:
py-pook: updated to 1.4.0
v1.4.0 / 2023-12-29
Add support for httpx
Enable mocket integration tests for Python >= 3.11
v1.3.0 / 2023-12-25
This release modernizes Pook build and development environments.
Drop support for EOL'd Python versions (in other words, 3.6 and 3.7)
Use pyproject.toml
Use ruff to lint files
Use pre-commit to add pre-commit hooks
Use hatch to manage test, development, and build environments
Fix the test configuration to actually run the example tests
Fix the documentation build
Fix support for asynchronous functions in the activate decorator (this was a \
direct result of re-enabling the example tests and finding lots of little \
issues)
Remove all mention of the unsupported pycurl library
Clean up tests that can use pytest parametrize to do so (and get better \
debugging information during tests runs as a result)
Use pytest-pook to clean up a bunch of unnecessary test fixtures
Fix deprecation warning for invalid string escape sequences caused by untagged \
regex strings
v1.2.1 / 2023-12-23
Fix usage of regex values in header matchers
Fix urllib SSL handling
v1.2.0 / 2023-12-17
feat(api): add support for binary bodies
fix(urllib3): don't put non-strings into HTTP header dict
refactor: drop Python 3.5 support
v1.1.0 / 2023-01-01
chore(version): bump minor v1.1.0
Switch to Python >= 3.5 and fix latest aiohttp compatability
fix: remove print cal
|
2022-08-24 14:50:12 by Thomas Klausner | Files touched by this commit (1) |
Log message:
py-pook: python 3.x only
|