~twom/canonical-identity-provider/django-1.11.x

« back to all changes in this revision

Viewing changes to src/identityprovider/tests/test_command_cleanup.py

  • Committer: Ubuntu One Auto Copilot
  • Author(s): Colin Watson
  • Date: 2018-01-29 16:32:48 UTC
  • mfrom: (1593.2.1 no-xrange)
  • Revision ID: otto-copilot@canonical.com-20180129163248-zbbccdz42i9u3pwb
Handle range/xrange changes in Python 3.

Merged from https://code.launchpad.net/~cjwatson/canonical-identity-provider/no-xrange/+merge/336733

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
class CleanupCommandTestCase(SSOBaseTestCase, ConcurrentCommandMixin):
27
27
 
28
28
    def populate(self, num=50):
29
 
        for i in xrange(num):
 
29
        for i in range(num):
30
30
            # Creation and running of the tests takes less than a second,
31
31
            # and because the cutoff for reaping uses int(time()), we need
32
32
            # to ensure that nonces are at least one second older than the
46
46
        self.assertEqual(num, OpenIDAssociation.objects.count())
47
47
 
48
48
    def make_test_accounts(self, count=0, date_created=None):
49
 
        for i in xrange(count):
 
49
        for i in range(count):
50
50
            email = self.factory.make_email_address(prefix='isdtest+',
51
51
                                                    domain='canonical.com')
52
52