diff options
Diffstat (limited to 'mediagoblin/tests/test_persona.py')
-rw-r--r-- | mediagoblin/tests/test_persona.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mediagoblin/tests/test_persona.py b/mediagoblin/tests/test_persona.py index a1cd30eb..a8466b8a 100644 --- a/mediagoblin/tests/test_persona.py +++ b/mediagoblin/tests/test_persona.py @@ -13,10 +13,16 @@ # # 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 urlparse + import pkg_resources import pytest -import mock +import six +try: + import mock +except ImportError: + import unittest.mock as mock + +import six.moves.urllib.parse as urlparse pytest.importorskip("requests") @@ -140,7 +146,7 @@ class TestPersonaPlugin(object): # Make sure user is in the session context = template.TEMPLATE_TEST_CONTEXT['mediagoblin/root.html'] session = context['request'].session - assert session['user_id'] == unicode(test_user.id) + assert session['user_id'] == six.text_type(test_user.id) _test_registration() |