84 lines
2.9 KiB
RPMSpec
84 lines
2.9 KiB
RPMSpec
Name: python-httpretty
|
|
Version: 1.1.4
|
|
Release: 7
|
|
Summary: HTTP Client mocking tool for Python
|
|
License: MIT
|
|
URL: https://pypi.org/project/httpretty/
|
|
Source0: https://files.pythonhosted.org/packages/source/h/httpretty/httpretty-%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
|
|
Patch0000: test_handle_slashes.patch
|
|
Patch0001: Duplicate-requests-in-latest_requests-if-there-are-chunks.patch
|
|
Patch0002: add-support-for-Misdirected-Request.patch
|
|
|
|
%description
|
|
HTTP Client mocking tool for Python.Provides a full fake TCP socket module.
|
|
|
|
%package -n python3-httpretty
|
|
Summary: HTTP Client mocking tool for Python3
|
|
BuildRequires: python3-devel python3-setuptools python3-httplib2 python3-freezegun
|
|
BuildRequires: python3-nose2 python3-requests python3-sure python3-tornado
|
|
Requires: python3-six
|
|
%{?python_provide:%python_provide python3-httpretty}
|
|
|
|
%description -n python3-httpretty
|
|
HTTP Client mocking tool for Python3.Provides a full fake TCP socket module.
|
|
|
|
%prep
|
|
%autosetup -n httpretty-%{version} -p1
|
|
sed -i 's/^with-randomly = 1$//' setup.cfg
|
|
sed -i 's/^rednose = 1$//' setup.cfg
|
|
|
|
%build
|
|
LANG=en_US.UTF-8 %py3_build
|
|
|
|
%install
|
|
LANG=en_US.UTF-8 %py3_install
|
|
|
|
%check
|
|
# https://github.com/gabrielfalcao/HTTPretty/issues/405
|
|
export EVENTLET_NO_GREENDNS=yes
|
|
sed -Ei 's/(test_https?_passthrough)/_\1/' tests/functional/test_passthrough.py
|
|
sed -Ei 's/(test_streaming_responses)/_\1/' tests/functional/test_requests.py
|
|
sed -Ei 's/(test_fakesock_socket_sendall_with_body_data_with_chunked_entry)/_\1/' tests/unit/test_core.py
|
|
sed -Ei 's/(test_httpretty_should_allow_registering_regexes_with_streaming_responses)/_\1/' tests/functional/test_requests.py
|
|
%if "%_arch" == "riscv64"
|
|
sed -Ei 's/two=miliseconds/ten=miliseconds/g' tests/functional/test_{urllib2,httplib2}.py
|
|
%endif
|
|
LANG=en_US.UTF-8 %{__python3} -m nose2 -v
|
|
|
|
%files -n python3-httpretty
|
|
%doc README.rst
|
|
%license COPYING
|
|
%{python3_sitelib}/httpretty
|
|
%{python3_sitelib}/httpretty-%{version}-py%{python3_version}.egg-info
|
|
|
|
%changelog
|
|
* Mon Nov 4 2024 laokz <zhangkai@iscas.ac.cn> - 1.1.4-7
|
|
- riscv64: increase tests timeout
|
|
|
|
* Wed Aug 2 2023 liyanan <thistleslyn@163.com> - 1.1.4-6
|
|
- skip failing testsuite tests after requests update
|
|
|
|
* Mon Jan 9 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 1.1.4-5
|
|
- add support for Misdirected Request
|
|
|
|
* Sat Jan 7 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 1.1.4-4
|
|
- Fix Duplicate requests in latest_requests if there are chunks
|
|
|
|
* Fri Nov 25 2022 xu_ping <xuping33@h-partners.com> - 1.1.4-3
|
|
- Fix test_httpretty_should_handle_paths_starting_with_two_slashes fail.
|
|
|
|
* Wed Aug 3 2022 kkz <zhaoshuang@uniontech.com> - 1.1.4-2
|
|
- Remove unnecessary buildrequires
|
|
|
|
* Sat Apr 2 2022 caodongxia <caodongxia@h-partners.com> - 1.1.4-1
|
|
- Update to 1.1.4
|
|
|
|
* Wed Aug 5 2020 zhangtao <zhangtao221@huawei.com> - 0.9.5-5
|
|
- Remove python2
|
|
|
|
* Sat Nov 23 2019 zhouyihang <zhouyihang1@huawei.com> - 0.9.5-4
|
|
- Package init
|