2013-09-03 09:27:43 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-httpretty
|
|
|
|
#
|
2022-03-14 11:53:11 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2013-09-03 09:27:43 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-12-04 14:32:33 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-09-26 15:30:49 +02:00
|
|
|
#
|
2013-09-03 09:27:43 +02:00
|
|
|
|
|
|
|
|
2017-08-21 09:57:56 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-04-09 15:15:01 +02:00
|
|
|
%define skip_python2 1
|
2013-09-03 09:27:43 +02:00
|
|
|
Name: python-httpretty
|
2022-03-14 11:53:11 +01:00
|
|
|
Version: 1.1.4
|
2013-09-03 09:27:43 +02:00
|
|
|
Release: 0
|
2017-08-28 06:14:10 +02:00
|
|
|
Summary: HTTP client mocking tool for Python
|
2013-09-26 15:30:49 +02:00
|
|
|
License: MIT
|
2013-09-03 09:27:43 +02:00
|
|
|
Group: Development/Languages/Python
|
2018-12-04 18:14:36 +01:00
|
|
|
URL: https://github.com/gabrielfalcao/HTTPretty
|
2017-08-21 09:57:56 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/h/httpretty/httpretty-%{version}.tar.gz
|
2020-04-09 15:15:01 +02:00
|
|
|
BuildRequires: %{python_module eventlet}
|
|
|
|
BuildRequires: %{python_module fakeredis}
|
|
|
|
BuildRequires: %{python_module freezegun}
|
2019-01-07 09:29:52 +01:00
|
|
|
BuildRequires: %{python_module httplib2}
|
2020-08-17 08:28:34 +02:00
|
|
|
BuildRequires: %{python_module nose2}
|
2019-01-07 09:29:52 +01:00
|
|
|
BuildRequires: %{python_module requests}
|
2017-08-21 09:57:56 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-01-07 09:29:52 +01:00
|
|
|
BuildRequires: %{python_module sure}
|
|
|
|
BuildRequires: %{python_module tornado}
|
2017-08-21 09:57:56 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2013-09-03 09:27:43 +02:00
|
|
|
BuildArch: noarch
|
2017-08-21 09:57:56 +02:00
|
|
|
%python_subpackages
|
2013-09-03 09:27:43 +02:00
|
|
|
|
|
|
|
%description
|
2017-08-28 06:14:10 +02:00
|
|
|
This library allows mocking of HTTP protocol based
|
2013-09-03 09:27:43 +02:00
|
|
|
unit tests.
|
2017-08-28 06:14:10 +02:00
|
|
|
It is similar to Ruby's FakeWeb.
|
2013-09-03 09:27:43 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n httpretty-%{version}
|
2020-08-12 14:31:30 +02:00
|
|
|
# no test coverage check needed
|
|
|
|
sed -i -e '/cover/ d' setup.cfg
|
|
|
|
# no color printout for tests
|
|
|
|
sed -i -e '/rednose/ d' setup.cfg
|
2013-09-03 09:27:43 +02:00
|
|
|
|
|
|
|
%build
|
2017-08-21 09:57:56 +02:00
|
|
|
%python_build
|
2014-02-17 11:09:26 +01:00
|
|
|
|
2020-08-17 08:28:34 +02:00
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
2014-02-17 11:09:26 +01:00
|
|
|
%check
|
2020-08-12 14:31:30 +02:00
|
|
|
# https://github.com/gabrielfalcao/HTTPretty/issues/405
|
|
|
|
export EVENTLET_NO_GREENDNS=yes
|
2020-04-09 15:15:01 +02:00
|
|
|
# test_http_passthrough and test_https_passthrough need internet connection
|
2020-08-17 08:28:34 +02:00
|
|
|
sed -Ei 's/(test_https?_passthrough)/_\1/' tests/functional/test_passthrough.py
|
|
|
|
# fails on 15.1
|
|
|
|
sed -Ei 's/(test_streaming_responses)/_\1/' tests/functional/test_requests.py
|
|
|
|
# fails on x86_64
|
|
|
|
sed -Ei 's/(test_fakesock_socket_sendall_with_body_data_with_chunked_entry)/_\1/' tests/unit/test_core.py
|
2013-09-03 09:27:43 +02:00
|
|
|
|
2020-08-17 08:28:34 +02:00
|
|
|
%python_exec -m nose2 -v
|
2017-08-21 09:57:56 +02:00
|
|
|
|
|
|
|
%files %{python_files}
|
2018-12-04 18:14:36 +01:00
|
|
|
%license COPYING
|
|
|
|
%doc README.rst
|
2016-03-13 22:05:43 +01:00
|
|
|
%{python_sitelib}/httpretty
|
2021-03-22 23:19:58 +01:00
|
|
|
%{python_sitelib}/httpretty-%{version}*-info
|
2013-09-03 09:27:43 +02:00
|
|
|
|
|
|
|
%changelog
|