tests: replace xrange usage
This commit is contained in:
parent
0d9a596b56
commit
c320e5471d
|
@ -109,13 +109,13 @@ def test_announces_publishing(app):
|
|||
|
||||
def test_rss_feed_items(app):
|
||||
c = Category.objects.create(name='Test announces')
|
||||
for i in xrange(10):
|
||||
for i in range(10):
|
||||
a = Announce.objects.create(category=c, title='Test %s' % i,
|
||||
publication_time=timezone.now(),
|
||||
text='text of announce %s' % i)
|
||||
feed_content = feedparser.parse(app.get(reverse('atom')).text)
|
||||
assert len(feed_content['entries']) <= settings.RSS_ITEMS_LIMIT
|
||||
for i in xrange(i, 10):
|
||||
for i in range(i, 10):
|
||||
a = Announce.objects.create(category=c, title='Test %s' % i,
|
||||
publication_time=timezone.now(),
|
||||
text='text of announce %s' % i)
|
||||
|
|
|
@ -126,7 +126,7 @@ def test_unsubscription_link(app, categories, announces, custom_mailoutbox):
|
|||
subscriptions_number = 3
|
||||
scheme = 'mailto:'
|
||||
for category in categories:
|
||||
for i in xrange(subscriptions_number):
|
||||
for i in range(subscriptions_number):
|
||||
uuid = uuid4()
|
||||
uri = scheme + '%s@example.com' % uuid
|
||||
Subscription.objects.create(category=category, identifier=uri, uuid=str(uuid))
|
||||
|
|
Reference in New Issue