Accepting request 977787 from home:pgajdos:python

- do not require python-mock for build
- added patches
  fix https://github.com/mindflayer/python-mocket/issues/178
  + python-mocket-no-mock.patch

OBS-URL: https://build.opensuse.org/request/show/977787
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mocket?expand=0&rev=47
This commit is contained in:
Sebastian Wagner 2022-05-17 13:58:41 +00:00 committed by Git OBS Bridge
parent 48cacb46bf
commit 86c0462991
3 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -upr mocket-3.10.5.orig/tests/main/test_http.py mocket-3.10.5/tests/main/test_http.py
--- mocket-3.10.5.orig/tests/main/test_http.py 2022-05-17 15:23:49.159143686 +0200
+++ mocket-3.10.5/tests/main/test_http.py 2022-05-17 15:23:49.163143712 +0200
@@ -10,7 +10,7 @@ from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen
-import mock
+from unittest import mock
import pytest
import requests

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue May 17 13:29:27 UTC 2022 - pgajdos@suse.com
- do not require python-mock for build
- added patches
fix https://github.com/mindflayer/python-mocket/issues/178
+ python-mocket-no-mock.patch
-------------------------------------------------------------------
Mon Apr 25 08:36:19 UTC 2022 - Sebastian Wagner <sebix+novell.com@sebix.at>

View File

@ -35,6 +35,8 @@ URL: https://github.com/mindflayer/python-mocket
Source0: https://files.pythonhosted.org/packages/source/m/mocket/mocket-%{version}.tar.gz
# PATCH-FIX-OPENSUSE recording-urllib3-brotli.patch -- our urllib has different default headers than upstreams test reference, code@bnavigator.de
Patch0: recording-urllib3-brotli.patch
# https://github.com/mindflayer/python-mocket/issues/178
Patch1: python-mocket-no-mock.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@ -57,7 +59,6 @@ BuildRequires: %{python_module cryptography}
BuildRequires: %{python_module decorator}
BuildRequires: %{python_module gevent}
BuildRequires: %{python_module http-parser >= 0.9.0}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pook}
BuildRequires: %{python_module pyOpenSSL}
BuildRequires: %{python_module pytest}
@ -83,6 +84,7 @@ sed -i '/pipenv/ d' setup.py
# urllib3 in TW accepts Brotli encoding by default
%patch0 -p1
%endif
%patch1 -p1
%build
%if !%{with test}