1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Replaced foo.next() by next(foo).

This new syntax for next() has been introduced in Python 2.6 and is
compatible with Python 3.
This commit is contained in:
Claude Paroz
2012-05-10 20:14:04 +02:00
parent 1c1a229632
commit 169b1a404c
20 changed files with 73 additions and 73 deletions

View File

@@ -489,7 +489,7 @@ def fieldsTest(format, self):
# Serialize then deserialize the test database
serialized_data = serializers.serialize(format, [obj], indent=2, fields=('field1','field3'))
result = serializers.deserialize(format, serialized_data).next()
result = next(serializers.deserialize(format, serialized_data))
# Check that the deserialized object contains data in only the serialized fields.
self.assertEqual(result.object.field1, 'first')