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 2011/05/21 15:13:43 UTC

svn commit: r1125693 - /incubator/libcloud/trunk/test/compute/test_gandi.py

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):