Commit ca07fda2 authored by Aymeric Augustin's avatar Aymeric Augustin
Browse files

[py3] Switched to Python 3-compatible imports.

xrange/range will be dealt with in a separate commit due to the huge
number of changes.
parent 0d914d08
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
from django.test import TestCase
from django.utils.unittest import skipUnless
from django.contrib.auth.models import User, AnonymousUser
from django.core.management import call_command
from StringIO import StringIO
from django.test import TestCase
from django.utils.six import StringIO
from django.utils.unittest import skipUnless

try:
    import crypt as crypt_module
+1 −2
Original line number Diff line number Diff line
from __future__ import unicode_literals

from StringIO import StringIO

from django.contrib.auth import models, management
from django.contrib.auth.management.commands import changepassword
from django.core.management.base import CommandError
from django.test import TestCase
from django.utils.six import StringIO


class GetDefaultUsernameTestCase(TestCase):
+1 −1
Original line number Diff line number Diff line
from future_builtins import zip
from django.utils.six.moves import zip

from django.db.backends.util import truncate_name, typecast_timestamp
from django.db.models.sql import compiler
+1 −1
Original line number Diff line number Diff line
from binascii import b2a_hex
try:
    import cPickle as pickle
    from django.utils.six.moves import cPickle as pickle
except ImportError:
    import pickle

+2 −1
Original line number Diff line number Diff line
@@ -952,7 +952,8 @@ class GEOSTest(unittest.TestCase, TestDataMixin):
    def test_pickle(self):
        "Testing pickling and unpickling support."
        # Using both pickle and cPickle -- just 'cause.
        import pickle, cPickle
        from django.utils.six.moves import cPickle
        import pickle

        # Creating a list of test geometries for pickling,
        # and setting the SRID on some of them.
Loading