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/05/27 07:47:42 UTC
svn commit: r1342997 - /libcloud/trunk/test/common/test_openstack.py
Author: tomaz
Date: Sun May 27 05:47:42 2012
New Revision: 1342997
URL: http://svn.apache.org/viewvc?rev=1342997&view=rev
Log:
Fix test so it works with python 2.5.
Modified:
libcloud/trunk/test/common/test_openstack.py
Modified: libcloud/trunk/test/common/test_openstack.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/common/test_openstack.py?rev=1342997&r1=1342996&r2=1342997&view=diff
==============================================================================
--- libcloud/trunk/test/common/test_openstack.py (original)
+++ libcloud/trunk/test/common/test_openstack.py Sun May 27 05:47:42 2012
@@ -4,6 +4,7 @@ import unittest
from mock import Mock
from libcloud.common.openstack import OpenStackBaseConnection
+from libcloud.utils.py3 import PY25
class OpenStackBaseConnectionTest(unittest.TestCase):
@@ -20,9 +21,13 @@ class OpenStackBaseConnectionTest(unitte
def test_base_connection_timeout(self):
self.connection.connect()
self.assertEquals(self.connection.timeout, self.timeout)
- self.connection.conn_classes[1].assert_called_with(host='127.0.0.1',
- port=443,
- timeout=10)
+ if PY25:
+ self.connection.conn_classes[1].assert_called_with(host='127.0.0.1',
+ port=443)
+ else:
+ self.connection.conn_classes[1].assert_called_with(host='127.0.0.1',
+ port=443,
+ timeout=10)
if __name__ == '__main__':