forked from pool/python-pytest-httpx
* Added `proxy_url` parameter which allows matching on proxy
URL.
* Requires `httpx`==0.25.\*
* Added `match_json` parameter which allows matching on JSON
decoded body (matching against python representation instead
of bytes).
* Even if it was never documented as a feature, the
`match_headers` parameter was not considering header names
case when matching.
* Matching on headers does not ignore name case anymore, the
name must now be cased as sent (as some servers might expect
a specific case).
* Add `:Any` type hint to `**matchers` function arguments to
satisfy strict type checking mode in `pyright`.
* Python `3.7` and `3.8` are no longer supported.
* `httpx_mock.add_response` is now returning a new
`httpx.Response` instance upon each matching request.
Preventing unnecessary recursion in streams.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-httpx?expand=0&rev=13
64 lines
1.9 KiB
RPMSpec
64 lines
1.9 KiB
RPMSpec
#
|
|
# spec file for package python-pytest-httpx
|
|
#
|
|
# Copyright (c) 2023 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.26.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 setuptools}
|
|
BuildRequires: python-rpm-macros
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module httpx >= 0.25.0}
|
|
BuildRequires: %{python_module pytest >= 7.0}
|
|
BuildRequires: %{python_module pytest-asyncio >= 0.20.0}
|
|
# /SECTION
|
|
BuildRequires: fdupes
|
|
Requires: python-httpx >= 0.25.0
|
|
Requires: python-pytest >= 7.0
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
Send responses to httpx.
|
|
|
|
%prep
|
|
%setup -q -n pytest_httpx-%{version}
|
|
# unpin exact version
|
|
sed -i '/install_requires/ s/httpx==0.24.\*/httpx/' setup.py
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%pytest
|
|
|
|
%files %{python_files}
|
|
%{python_sitelib}/pytest_httpx
|
|
%{python_sitelib}/pytest_httpx-%{version}*-info
|
|
|
|
%changelog
|