libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1125693 - /incubator/libcloud/trunk/test/compute/test_gandi.py
Date Sat, 21 May 2011 13:13:43 GMT
Author: tomaz
Date: Sat May 21 13:13:43 2011
New Revision: 1125693

URL: http://svn.apache.org/viewvc?rev=1125693&view=rev
Log:
Fix Gandi.net tests so they work with Python 2.7

Modified:
    incubator/libcloud/trunk/test/compute/test_gandi.py

Modified: incubator/libcloud/trunk/test/compute/test_gandi.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/compute/test_gandi.py?rev=1125693&r1=1125692&r2=1125693&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/compute/test_gandi.py (original)
+++ incubator/libcloud/trunk/test/compute/test_gandi.py Sat May 21 13:13:43 2011
@@ -36,7 +36,12 @@ class MockGandiTransport(xmlrpclib.Trans
         mock = GandiMockHttp(host, 80)
         mock.request('POST', "%s/%s" % (handler, method))
         resp = mock.getresponse()
-        return self._parse_response(resp.body, None)
+
+        if sys.version[0] == '2' and sys.version[2] == '7':
+            response = self.parse_response(resp)
+        else:
+            response = self.parse_response(resp.body)
+        return response
 
 class GandiTests(unittest.TestCase):
 



Mime
View raw message