[Python-modules-commits] [cherrypy3] 04/08: use mock.mock instead of unittest.mock

Carl Suster arcresu-guest at moszumanska.debian.org
Thu Jan 12 07:35:13 UTC 2017


This is an automated email from the git hooks/post-receive script.

arcresu-guest pushed a commit to branch master
in repository cherrypy3.

commit a4c6395e84750b9996483b23cf0dead2995ab7cd
Author: Carl Suster <carl at contraflo.ws>
Date:   Wed Jan 4 17:33:16 2017 +1100

    use mock.mock instead of unittest.mock
    
    Upstream uses backports.unittest_mock. Instead, we use python*-mock
    which is available in Debian and does the same job of backporting Python
    3's unittest mock other than calling it mock.mock instead. This patch
    just switches to this import statement in the test suite.
---
 cherrypy/test/test_encoding.py         | 2 +-
 cherrypy/test/test_http.py             | 2 +-
 cherrypy/wsgiserver/test_wsgiserver.py | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cherrypy/test/test_encoding.py b/cherrypy/test/test_encoding.py
index 93778da..197c224 100644
--- a/cherrypy/test/test_encoding.py
+++ b/cherrypy/test/test_encoding.py
@@ -2,7 +2,7 @@
 
 import gzip
 import io
-from unittest import mock
+from mock import mock
 
 import six
 
diff --git a/cherrypy/test/test_http.py b/cherrypy/test/test_http.py
index 8cba5a1..a8bd0a3 100644
--- a/cherrypy/test/test_http.py
+++ b/cherrypy/test/test_http.py
@@ -4,7 +4,7 @@ import errno
 import mimetypes
 import socket
 import sys
-from unittest import mock
+from mock import mock
 
 import six
 
diff --git a/cherrypy/wsgiserver/test_wsgiserver.py b/cherrypy/wsgiserver/test_wsgiserver.py
index b1b6741..3fe2b1f 100644
--- a/cherrypy/wsgiserver/test_wsgiserver.py
+++ b/cherrypy/wsgiserver/test_wsgiserver.py
@@ -1,4 +1,4 @@
-from unittest import mock
+from mock import mock
 
 import six
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/cherrypy3.git



More information about the Python-modules-commits mailing list