aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2018-01-29 01:26:17 +0000
committerLinda Wang <wangwulin@huawei.com>2018-01-29 01:48:50 +0000
commit5a77070ed767158017ceb8ea3c319af60c86b830 (patch)
tree318829ffa7fc11cdaee4922ef9e7d2c4f97a86f5 /functest/tests/unit
parentc78fcdeed0ed74661484082801f16c14586b75d4 (diff)
Fix the connect issue when checking deployment
Socket.connect() requires only one param with type tuple. Change-Id: I63aa4633e80bde3ad5e1b5af9d67d8f46eb84571 Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/tests/unit')
-rw-r--r--functest/tests/unit/ci/test_check_deployment.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/functest/tests/unit/ci/test_check_deployment.py b/functest/tests/unit/ci/test_check_deployment.py
index 46dcc24c..aeeca587 100644
--- a/functest/tests/unit/ci/test_check_deployment.py
+++ b/functest/tests/unit/ci/test_check_deployment.py
@@ -45,25 +45,25 @@ class CheckDeploymentTesting(unittest.TestCase):
@mock.patch('socket.socket.connect', side_effect=TypeError)
def test_verify_connectivity_ko1(self, *args):
self.assertFalse(check_deployment.verify_connectivity("127.0.0.1"))
- args[0].assert_called_once_with(None, 80)
+ args[0].assert_called_once_with((None, 80))
@mock.patch('socket.socket.connect', side_effect=socket.error)
def test_verify_connectivity_ko2(self, *args):
self.assertFalse(
check_deployment.verify_connectivity("http://127.0.0.1"))
- args[0].assert_called_once_with("127.0.0.1", 80)
+ args[0].assert_called_once_with(("127.0.0.1", 80))
@mock.patch('socket.socket.connect', side_effect=socket.error)
def test_verify_connectivity_ko3(self, *args):
self.assertFalse(
check_deployment.verify_connectivity("https://127.0.0.1"))
- args[0].assert_called_once_with("127.0.0.1", 443)
+ args[0].assert_called_once_with(("127.0.0.1", 443))
@mock.patch('socket.socket.connect')
def test_verify_connectivity(self, *args):
self.assertTrue(
check_deployment.verify_connectivity("https://127.0.0.1"))
- args[0].assert_called_once_with("127.0.0.1", 443)
+ args[0].assert_called_once_with(("127.0.0.1", 443))
@mock.patch('snaps.openstack.utils.keystone_utils.keystone_session',
return_value=mock.Mock(