Import mock correctly on py3
authorChristopher Allan Webber <cwebber@dustycloud.org>
Tue, 16 Sep 2014 19:46:02 +0000 (14:46 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Tue, 16 Sep 2014 19:46:02 +0000 (14:46 -0500)
This commit sponsored by Andrew McNicol.  Thank you!

mediagoblin/tests/test_util.py

index e1c3c7e5f7c6e1f8bbbc3fc0bf24d2664d39b5bb..8193233fc6a6287ef30c8dfad60766c486dbbf8b 100644 (file)
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import mock
+try:
+    import mock
+except ImportError:
+    import unittest.mock as mock
 import email
 import pytest
 import smtplib