From c320e5471d9782f03c98e85ecb6d60e5a24251f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 12 Apr 2020 10:23:58 +0200 Subject: [PATCH] tests: replace xrange usage --- tests/test_announces.py | 4 ++-- tests/test_broadcasting.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_announces.py b/tests/test_announces.py index 855e785..904b555 100644 --- a/tests/test_announces.py +++ b/tests/test_announces.py @@ -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) diff --git a/tests/test_broadcasting.py b/tests/test_broadcasting.py index 5320628..689a10d 100644 --- a/tests/test_broadcasting.py +++ b/tests/test_broadcasting.py @@ -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))