forked from pool/python-pytest-httpx
* `is_optional` parameter is now available on responses and
callbacks registration. Allowing to add optional responses
while keeping other responses as mandatory. Refer to
documentation for more details.
* `is_reusable` parameter is now available on responses and
callbacks registration. Allowing to add multi-match responses
while keeping other responses as single-match. Refer to
documentation for more details.
* `httpx_mock.get_request` will now also propose to refine
filters if more than one request is found instead of only
proposing to switch to `httpx_mock.get_requests`.
* Explicit support for python `3.13`.
* `should_mock` option (callable returning a boolean) is now
available, defaulting to always returning `True`. Refer to
documentation for more details.
* Matching on the full multipart body can now be performed
using `match_files` and `match_data` parameters. Refer to
documentation for more details.
* Matching on extensions (including timeout) can now be
performed using `match_extensions` parameter. Refer to
documentation for more details.
* The following option is now available:
* `can_send_already_matched_responses` (boolean), defaulting to
`False`.
* Assertion failure message in case of unmatched responses is
now linking documentation on how to deactivate the check.
* Assertion failure message in case of unmatched requests is
now linking documentation on how to deactivate the check.
* `httpx.TimeoutException` message issued in case of unmatched
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-httpx?expand=0&rev=21
64 lines
1.9 KiB
RPMSpec
64 lines
1.9 KiB
RPMSpec
#
|
|
# spec file for package python-pytest-httpx
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-pytest-httpx
|
|
Version: 0.34.0
|
|
Release: 0
|
|
Summary: Send responses to httpx
|
|
License: MIT
|
|
URL: https://colin-b.github.io/pytest_httpx/
|
|
Source: https://github.com/Colin-b/pytest_httpx/archive/refs/tags/v%{version}.tar.gz#/pytest_httpx-%{version}-gh.tar.gz
|
|
BuildRequires: %{python_module base >= 3.9}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module wheel}
|
|
BuildRequires: python-rpm-macros
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module httpx >= 0.27.0 with %python-httpx < 0.28}
|
|
BuildRequires: %{python_module pytest >= 8.0}
|
|
BuildRequires: %{python_module pytest-asyncio >= 0.24.0}
|
|
# /SECTION
|
|
BuildRequires: fdupes
|
|
Requires: python-pytest >= 8.0
|
|
Requires: (python-httpx >= 0.27.0 with python-httpx < 0.28)
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
Send responses to httpx.
|
|
|
|
%prep
|
|
%setup -q -n pytest_httpx-%{version}
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%pytest
|
|
|
|
%files %{python_files}
|
|
%{python_sitelib}/pytest_httpx
|
|
%{python_sitelib}/pytest_httpx-%{version}.dist-info
|
|
|
|
%changelog
|