--- /dev/null
+--- httpretty-0.9.7/setup.py.orig 2018-11-04 23:34:48.000000000 +0100
++++ httpretty-0.9.7/setup.py 2020-06-07 09:55:21.573933681 +0200
+@@ -41,7 +41,7 @@
+
+
+ install_requires = ['six']
+-tests_requires = ['nose', 'sure', 'coverage', 'mock', 'rednose']
++tests_requires = ['nose', 'sure', 'coverage', 'mock;python_version<"3.2"', 'rednose']
+
+
+ setup(
+--- httpretty-0.9.7/tests/functional/test_fakesocket.py.orig 2018-11-04 23:34:48.000000000 +0100
++++ httpretty-0.9.7/tests/functional/test_fakesocket.py 2020-06-07 09:57:25.379929633 +0200
+@@ -28,7 +28,10 @@
+ import functools
+ import socket
+
+-import mock
++try:
++ import mock
++except ImportError:
++ from unittest import mock
+
+
+ class FakeSocket(socket.socket):
+--- httpretty-0.9.7/tests/functional/test_requests.py.orig 2019-08-26 20:41:12.000000000 +0200
++++ httpretty-0.9.7/tests/functional/test_requests.py 2020-06-07 10:02:50.081503907 +0200
+@@ -816,7 +816,10 @@
+ ("HTTPretty should call a callback function *once* and set its return value"
+ " as the body of the response requests")
+
+- from mock import Mock
++ try:
++ from mock import Mock
++ except ImportError:
++ from unittest.mock import Mock
+
+ def _request_callback(request, uri, headers):
+ return [200, headers, "The {} response from {}".format(decode_utf8(request.method), uri)]
+--- httpretty-0.9.7/tests/unit/test_core.py.orig 2019-08-26 20:41:12.000000000 +0200
++++ httpretty-0.9.7/tests/unit/test_core.py 2020-06-07 10:04:37.994252626 +0200
+@@ -5,7 +5,10 @@
+ import errno
+ from datetime import datetime
+
+-from mock import Mock, patch, call
++try:
++ from mock import Mock, patch, call
++except ImportError:
++ from unittest.mock import Mock, patch, call
+ from sure import expect
+
+ from httpretty.compat import StringIO
+--- httpretty-0.9.7/tests/unit/test_main.py.orig 2019-08-26 20:41:12.000000000 +0200
++++ httpretty-0.9.7/tests/unit/test_main.py 2020-06-07 10:05:34.600612630 +0200
+@@ -1,7 +1,10 @@
+ #!/usr/bin/env python
+ # -*- coding: utf-8 -*-
+ from __future__ import unicode_literals
+-from mock import patch
++try:
++ from mock import patch
++except ImportError:
++ from unittest.mock import patch
+ import httpretty
+ from httpretty.core import HTTPrettyRequest
+
#
# Conditional build:
-%bcond_with tests # unit/functional tests
+%bcond_without tests # unit/functional tests
%bcond_with doc # build Sphinx documentation (already built docs included in dist as of 0.9.7)
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
#Source0Download: https://pypi.org/simple/httpretty/
Source0: https://files.pythonhosted.org/packages/source/h/httpretty/httpretty-%{version}.tar.gz
# Source0-md5: 2fc3d0dc986200be95ce8ad3ef56bc04
+Patch0: %{name}-mock.patch
URL: https://httpretty.readthedocs.io/
%if %{with python2}
BuildRequires: python-modules >= 1:2.7
%prep
%setup -q -n %{module}-%{version}
+%patch0 -p1
%build
%if %{with python2}