d8e1fd5db3
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/python-httplib2.git#80f2108eb9e9db5993468106b235e0e2c96ee9ed
74 lines
1.7 KiB
Diff
74 lines
1.7 KiB
Diff
diff --git a/requirements-test.txt b/requirements-test.txt
|
|
index d208a8f..623875e 100644
|
|
--- a/requirements-test.txt
|
|
+++ b/requirements-test.txt
|
|
@@ -1,6 +1,6 @@
|
|
flake8==3.4.1
|
|
future==0.16.0
|
|
-mock==2.0.0
|
|
+mock==2.0.0;python_version<"3.3"
|
|
pytest-cov==2.5.1
|
|
pytest-forked==0.2
|
|
pytest-randomly==1.2.1
|
|
diff --git a/tests/test_cacerts_from_env.py b/tests/test_cacerts_from_env.py
|
|
index cb2bd9f..f04ba0e 100644
|
|
--- a/tests/test_cacerts_from_env.py
|
|
+++ b/tests/test_cacerts_from_env.py
|
|
@@ -1,6 +1,9 @@
|
|
import os
|
|
import sys
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
import pytest
|
|
import tempfile
|
|
import httplib2
|
|
diff --git a/tests/test_http.py b/tests/test_http.py
|
|
index f61992c..65bac01 100644
|
|
--- a/tests/test_http.py
|
|
+++ b/tests/test_http.py
|
|
@@ -5,7 +5,10 @@ from __future__ import print_function
|
|
import email.utils
|
|
import errno
|
|
import httplib2
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
import os
|
|
import pytest
|
|
from six.moves import http_client, urllib
|
|
diff --git a/tests/test_other.py b/tests/test_other.py
|
|
index 0f450ab..6b902b9 100644
|
|
--- a/tests/test_other.py
|
|
+++ b/tests/test_other.py
|
|
@@ -1,5 +1,8 @@
|
|
import httplib2
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
import os
|
|
import pickle
|
|
import pytest
|
|
diff --git a/tests/test_proxy.py b/tests/test_proxy.py
|
|
index edafe01..556b448 100644
|
|
--- a/tests/test_proxy.py
|
|
+++ b/tests/test_proxy.py
|
|
@@ -9,7 +9,10 @@ from __future__ import division
|
|
from __future__ import print_function
|
|
|
|
import httplib2
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
import os
|
|
import pytest
|
|
import socket
|