Accepting request 827226 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/827226
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-httpretty?expand=0&rev=16
This commit is contained in:
Dominique Leuenberger 2020-08-25 10:37:57 +00:00 committed by Git OBS Bridge
commit 08f0ea9ee9
2 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Aug 16 11:36:11 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
- Replace nose with nose2
-------------------------------------------------------------------
Wed Aug 12 12:24:09 UTC 2020 - Benjamin Greiner <code@bnavigator.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-httpretty
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -30,7 +30,7 @@ BuildRequires: %{python_module eventlet}
BuildRequires: %{python_module fakeredis}
BuildRequires: %{python_module freezegun}
BuildRequires: %{python_module httplib2}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module nose2}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module sure}
@ -56,15 +56,21 @@ sed -i -e '/rednose/ d' setup.cfg
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# https://github.com/gabrielfalcao/HTTPretty/issues/405
export EVENTLET_NO_GREENDNS=yes
# test_http_passthrough and test_https_passthrough need internet connection
%python_expand nosetests-%{$python_bin_suffix} --exclude='test_http.?_passthrough'
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
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_exec -m nose2 -v
%files %{python_files}
%license COPYING