You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2012/12/27 00:27:36 UTC

svn commit: r1426088 - /libcloud/trunk/libcloud/test/__init__.py

Author: tomaz
Date: Wed Dec 26 23:27:36 2012
New Revision: 1426088

URL: http://svn.apache.org/viewvc?rev=1426088&view=rev
Log:
More test compatibility fixes.

Modified:
    libcloud/trunk/libcloud/test/__init__.py

Modified: libcloud/trunk/libcloud/test/__init__.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/__init__.py?rev=1426088&r1=1426087&r2=1426088&view=diff
==============================================================================
--- libcloud/trunk/libcloud/test/__init__.py (original)
+++ libcloud/trunk/libcloud/test/__init__.py Wed Dec 26 23:27:36 2012
@@ -13,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import sys
 import random
 import unittest
 
@@ -86,7 +87,10 @@ class MockResponse(object):
         return self.body.read(*args, **kwargs)
 
     def next(self):
-        return next(self.body)
+        if sys.version_info >= (2, 5) and sys.version_info <= (2, 6):
+            return self.body.next()
+        else:
+            return next(self.body)
 
     def __next__(self):
         return self.next()