You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2017/01/09 09:39:01 UTC
[2/3] libcloud git commit: add test for port propagation issue
add test for port propagation issue
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/8b3b1cbc
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/8b3b1cbc
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/8b3b1cbc
Branch: refs/heads/trunk
Commit: 8b3b1cbcf650df843d7e1329db7f0572883dd67c
Parents: 6261cc5
Author: Anthony Shaw <an...@apache.org>
Authored: Mon Jan 9 19:23:57 2017 +1100
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Jan 9 19:23:57 2017 +1100
----------------------------------------------------------------------
libcloud/test/test_connection.py | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/8b3b1cbc/libcloud/test/test_connection.py
----------------------------------------------------------------------
diff --git a/libcloud/test/test_connection.py b/libcloud/test/test_connection.py
index b4743c3..c6c770d 100644
--- a/libcloud/test/test_connection.py
+++ b/libcloud/test/test_connection.py
@@ -99,6 +99,16 @@ class BaseConnectionClassTestCase(unittest.TestCase):
self.assertEqual(conn.proxy_host, '127.0.0.5')
self.assertEqual(conn.proxy_port, 3128)
+ def test_connection_to_unusual_port(self):
+ conn = LibcloudConnection(host='localhost', port=8080)
+ self.assertEqual(conn.proxy_scheme, None)
+ self.assertEqual(conn.proxy_host, None)
+ self.assertEqual(conn.proxy_port, None)
+ self.assertEqual(conn.host, 'http://localhost:8080')
+
+ conn = LibcloudConnection(host='localhost', port=80)
+ self.assertEqual(conn.host, 'http://localhost')
+
class ConnectionClassTestCase(unittest.TestCase):
def setUp(self):