PYTHON-583 Adding documentation, enhancing integration test

This commit is contained in:
GregBestland
2016-06-10 18:12:20 -05:00
parent 89e2200281
commit 2796ee5ec7

View File

@@ -80,6 +80,12 @@ class ControlConnectionTests(unittest.TestCase):
def test_get_control_connection_host(self):
"""
Test to validate Cluster.get_control_connection_host() metadata
@since 3.5.0
@jira_ticket PYTHON-583
@expected_result the control connection metadata should accurately reflect cluster state.
@test_category metadata
"""
host = self.cluster.get_control_connection_host()
@@ -91,3 +97,9 @@ class ControlConnectionTests(unittest.TestCase):
host = self.cluster.get_control_connection_host()
self.assertEqual(host.address, cc_host)
self.assertEqual(host.is_up, True)
# reconnect and make sure that the new host is reflected correctly
self.cluster.control_connection._reconnect()
new_host = self.cluster.get_control_connection_host()
self.assertNotEqual(host, new_host)