Accepting request 990666 from devel:languages:python
- Add patch remove-mock.patch: * Use unittest.mock if available. OBS-URL: https://build.opensuse.org/request/show/990666 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-requests-mock?expand=0&rev=18
This commit is contained in:
commit
872f1cec78
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 22 11:15:27 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch remove-mock.patch:
|
||||
* Use unittest.mock if available.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 6 11:58:05 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-requests-mock
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -22,11 +22,10 @@ Version: 1.9.3
|
||||
Release: 0
|
||||
Summary: Module to mock out responses from the requests package
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/jamielennox/requests-mock
|
||||
Source: https://files.pythonhosted.org/packages/source/r/requests-mock/requests-mock-%{version}.tar.gz
|
||||
Patch0: remove-mock.patch
|
||||
BuildRequires: %{python_module fixtures}
|
||||
BuildRequires: %{python_module mock}
|
||||
BuildRequires: %{python_module pbr}
|
||||
BuildRequires: %{python_module purl}
|
||||
BuildRequires: %{python_module purl}
|
||||
@ -55,7 +54,7 @@ requests-mock provides a building block to stub out the HTTP requests portions o
|
||||
You should checkout the docs for more information.
|
||||
|
||||
%prep
|
||||
%setup -q -n requests-mock-%{version}
|
||||
%autosetup -p1 -n requests-mock-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
16
remove-mock.patch
Normal file
16
remove-mock.patch
Normal file
@ -0,0 +1,16 @@
|
||||
Index: requests-mock-1.9.3/tests/test_mocker.py
|
||||
===================================================================
|
||||
--- requests-mock-1.9.3.orig/tests/test_mocker.py
|
||||
+++ requests-mock-1.9.3/tests/test_mocker.py
|
||||
@@ -12,7 +12,10 @@
|
||||
|
||||
import pickle
|
||||
|
||||
-import mock
|
||||
+try:
|
||||
+ from unittest import mock
|
||||
+except ImportError:
|
||||
+ import mock
|
||||
import requests
|
||||
|
||||
import requests_mock
|
Loading…
x
Reference in New Issue
Block a user