def test_none_result(self): dummy_node = DummyNodeNone() expected_result = set([]) self.assertEqual( set( get_non_system_ks_cf_list(loader_node=dummy_node, db_node=dummy_node, filter_out_table_with_counter=True, filter_out_mv=True)), expected_result)
def test_filter_out_mv(self): dummy_node = DummyNode() expected_result = set( ['mview.users', 'keyspace1.standard1', 'keyspace1.counter1']) self.assertEqual( set( get_non_system_ks_cf_list(loader_node=dummy_node, db_node=dummy_node, filter_out_mv=True)), expected_result)
def test_filter_table_only_no_counter(self): # pylint: disable=invalid-name dummy_node = DummyNode() expected_result = set(['mview.users', 'keyspace1.standard1']) self.assertEqual( set( get_non_system_ks_cf_list(loader_node=dummy_node, db_node=dummy_node, filter_out_table_with_counter=True, filter_out_mv=True)), expected_result)
def test_default_params(self): dummy_node = DummyNode() expected_result = set([ 'mview.users', 'mview.users_by_first_name', 'keyspace1.standard1', 'mview.users_by_last_name', 'keyspace1.counter1' ]) self.assertEqual( set( get_non_system_ks_cf_list(loader_node=dummy_node, db_node=dummy_node)), expected_result)
def test_filter_out_counter(self): dummy_node = DummyNode() expected_result = set([ 'mview.users', 'mview.users_by_first_name', 'keyspace1.standard1', 'mview.users_by_last_name' ]) self.assertEqual( set( get_non_system_ks_cf_list(loader_node=dummy_node, db_node=dummy_node, filter_out_table_with_counter=True)), expected_result)