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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user