From: Christopher Allan Webber Date: Tue, 16 Sep 2014 19:46:02 +0000 (-0500) Subject: Import mock correctly on py3 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fa3f46d7144629eed6f1f6f9abc884a1b8f4c330;p=mediagoblin.git Import mock correctly on py3 This commit sponsored by Andrew McNicol. Thank you! --- diff --git a/mediagoblin/tests/test_util.py b/mediagoblin/tests/test_util.py index e1c3c7e5..8193233f 100644 --- a/mediagoblin/tests/test_util.py +++ b/mediagoblin/tests/test_util.py @@ -14,7 +14,10 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -import mock +try: + import mock +except ImportError: + import unittest.mock as mock import email import pytest import smtplib