Python 3: use next(foo) instead of foo.next()

This is compatible with both versions of Python.

Change-Id: I50f9b2fa0c2333010c10eb4db34d972aa379f0e3
This commit is contained in:
Cyril Roelandt 2014-06-02 00:21:01 +02:00
parent 803eed6083
commit 7f3153c5ea
1 changed files with 1 additions and 1 deletions

View File

@ -759,7 +759,7 @@ class ImageManagerTest(testtools.TestCase):
'return_req_id': [],
}
images = self.mgr.list(**fields)
images.next()
next(images)
self.assertEqual(fields['return_req_id'], ['req-1234'])
def test_image_list_with_notfound_owner(self):