forked from pool/python-geventhttpclient
Accepting request 855336 from home:mcepl:branches:devel:tools:scm
- Add remove_mock.patch to remove dependency on the external mock package (gh#gwik/geventhttpclient#135). OBS-URL: https://build.opensuse.org/request/show/855336 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-geventhttpclient?expand=0&rev=10
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 11 23:08:43 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Add remove_mock.patch to remove dependency on the external mock
|
||||||
|
package (gh#gwik/geventhttpclient#135).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Aug 1 05:08:20 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
Sat Aug 1 05:08:20 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
@@ -25,11 +25,13 @@ License: MIT
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/gwik/geventhttpclient
|
URL: https://github.com/gwik/geventhttpclient
|
||||||
Source: https://files.pythonhosted.org/packages/source/g/geventhttpclient/geventhttpclient-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/g/geventhttpclient/geventhttpclient-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM remove_mock.patch gh#gwik/geventhttpclient#135 mcepl@suse.com
|
||||||
|
# remove dependency on the external module mock
|
||||||
|
Patch0: remove_mock.patch
|
||||||
BuildRequires: %{python_module certifi}
|
BuildRequires: %{python_module certifi}
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module dpkt}
|
BuildRequires: %{python_module dpkt}
|
||||||
BuildRequires: %{python_module gevent}
|
BuildRequires: %{python_module gevent}
|
||||||
BuildRequires: %{python_module mock}
|
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module six}
|
BuildRequires: %{python_module six}
|
||||||
@@ -52,7 +54,7 @@ generally, it is designed for pulling from REST APIs and streaming
|
|||||||
APIs like Twitter's.
|
APIs like Twitter's.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n geventhttpclient-%{version}
|
%autosetup -p1 -n geventhttpclient-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
18
remove_mock.patch
Normal file
18
remove_mock.patch
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
--- a/src/geventhttpclient/tests/test_ssl.py
|
||||||
|
+++ b/src/geventhttpclient/tests/test_ssl.py
|
||||||
|
@@ -1,5 +1,4 @@
|
||||||
|
-import mock
|
||||||
|
-from mock import patch, Mock
|
||||||
|
+import unittest.mock as mock
|
||||||
|
|
||||||
|
import dpkt.ssl
|
||||||
|
import six
|
||||||
|
@@ -117,7 +116,7 @@ def _get_sni_sent_from_client(**addition
|
||||||
|
('127.0.0.1', server_port)
|
||||||
|
)
|
||||||
|
with mock.patch(
|
||||||
|
- 'gevent.socket.getaddrinfo', Mock(return_value=[mock_addrinfo])
|
||||||
|
+ 'gevent.socket.getaddrinfo', mock.Mock(return_value=[mock_addrinfo])
|
||||||
|
):
|
||||||
|
|
||||||
|
server_host = 'some_foo'
|
Reference in New Issue
Block a user