Update unit tests for new refresh_schema signature.

This commit is contained in:
Adam Holmberg
2015-05-06 16:29:23 -05:00
parent 7f2e992d76
commit 087293050b
2 changed files with 4 additions and 4 deletions

View File

@@ -410,12 +410,12 @@ class ControlConnectionTest(unittest.TestCase):
} }
self.cluster.scheduler.reset_mock() self.cluster.scheduler.reset_mock()
self.control_connection._handle_schema_change(event) self.control_connection._handle_schema_change(event)
self.cluster.scheduler.schedule_unique.assert_called_once_with(0.0, self.control_connection.refresh_schema, 'ks1', 'table1', None) self.cluster.scheduler.schedule_unique.assert_called_once_with(0.0, self.control_connection.refresh_schema, 'ks1', 'table1', None, None, None)
self.cluster.scheduler.reset_mock() self.cluster.scheduler.reset_mock()
event['table'] = None event['table'] = None
self.control_connection._handle_schema_change(event) self.control_connection._handle_schema_change(event)
self.cluster.scheduler.schedule_unique.assert_called_once_with(0.0, self.control_connection.refresh_schema, 'ks1', None, None) self.cluster.scheduler.schedule_unique.assert_called_once_with(0.0, self.control_connection.refresh_schema, 'ks1', None, None, None, None)
def test_refresh_disabled(self): def test_refresh_disabled(self):
cluster = MockCluster() cluster = MockCluster()
@@ -463,4 +463,4 @@ class ControlConnectionTest(unittest.TestCase):
cc_no_topo_refresh._handle_schema_change(schema_event) cc_no_topo_refresh._handle_schema_change(schema_event)
cluster.scheduler.schedule_unique.assert_has_calls([call(ANY, cc_no_topo_refresh.refresh_node_list_and_token_map), cluster.scheduler.schedule_unique.assert_has_calls([call(ANY, cc_no_topo_refresh.refresh_node_list_and_token_map),
call(0.0, cc_no_topo_refresh.refresh_schema, call(0.0, cc_no_topo_refresh.refresh_schema,
schema_event['keyspace'], schema_event['table'], None)]) schema_event['keyspace'], schema_event['table'], None, None, None)])

View File

@@ -105,7 +105,7 @@ class ResponseFutureTests(unittest.TestCase):
kind=RESULT_KIND_SCHEMA_CHANGE, kind=RESULT_KIND_SCHEMA_CHANGE,
results={'keyspace': "keyspace1", "table": "table1"}) results={'keyspace': "keyspace1", "table": "table1"})
rf._set_result(result) rf._set_result(result)
session.submit.assert_called_once_with(ANY, 'keyspace1', 'table1', None, ANY, rf) session.submit.assert_called_once_with(ANY, 'keyspace1', 'table1', None, None, None, ANY, rf)
def test_other_result_message_kind(self): def test_other_result_message_kind(self):
session = self.make_session() session = self.make_session()