summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFlorian Apolloner <florian@apolloner.eu>2014-07-30 22:22:04 +0200
committerFlorian Apolloner <florian@apolloner.eu>2014-07-30 22:22:04 +0200
commit4453c80634fb72b60e849480e52c06b570c696d5 (patch)
tree64ee95792dbef5116a7e34023f1f583986a2ae10 /tests
parent97a38de230371c0b6ad8a86abba8425186c147c7 (diff)
Fixed the previous commit for Python3.
Diffstat (limited to 'tests')
-rw-r--r--tests/model_fields/models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/model_fields/models.py b/tests/model_fields/models.py
index 8dfdcb91d5..0e9fe23c67 100644
--- a/tests/model_fields/models.py
+++ b/tests/model_fields/models.py
@@ -10,6 +10,7 @@ except ImportError:
from django.core.files.storage import FileSystemStorage
from django.db import models
from django.db.models.fields.files import ImageFieldFile, ImageField
+from django.utils import six
class Foo(models.Model):
@@ -43,14 +44,14 @@ class Whiz(models.Model):
c = models.IntegerField(choices=CHOICES, null=True)
-class Counter:
+class Counter(six.Iterator):
def __init__(self):
self.n = 1
def __iter__(self):
return self
- def next(self): # Python 3: def __next__(self)
+ def __next__(self):
if self.n > 5:
raise StopIteration
else: