#NEWLINE# def test_get_refreshable_tasks( self ) : #NEWLINE# #INDENT# deployment_tasks = [ self . env . get_default_plugin_deployment_tasks ( ** { #NEWLINE# #INDENT# 'id' : 'refreshable_task_on_keystone' , #NEWLINE# consts . TASK_REFRESH_FIELD : [ 'keystone_config' ] , #NEWLINE# #UNINDENT# } ) [ 0 ] , self . env . get_default_plugin_deployment_tasks ( ** { #NEWLINE# #INDENT# 'id' : 'refreshable_task_on_nova' , #NEWLINE# consts . TASK_REFRESH_FIELD : [ 'nova_config' ] , #NEWLINE# #UNINDENT# } ) [ 0 ] ] #NEWLINE# plugin_metadata = self . env . get_default_plugin_metadata ( deployment_tasks = deployment_tasks ) #NEWLINE# cluster = self . _create_cluster_with_plugins ( [ t ] ) #NEWLINE# refreshable_tasks = objects . Cluster . get_refreshable_tasks ( cluster ) #NEWLINE# tasks_ids = [ t [ 'id' ] for t in refreshable_tasks ] #NEWLINE# self . assertIn ( deployment_tasks [ 1 ] [ 'id' ] , tasks_ids ) #NEWLINE# self . assertIn ( deployment_tasks [ 0 ] [ 'id' ] , tasks_ids ) #NEWLINE# refreshable_tasks_on_nova = objects . Cluster . get_refreshable_tasks ( cluster , filter_by_configs = ( 'nova_config' , ) ) #NEWLINE# tasks_ids = [ t [ 'id' ] for t in refreshable_tasks_on_nova ] #NEWLINE# self . assertIn ( deployment_tasks [ 1 ] [ 'id' ] , tasks_ids ) #NEWLINE# self . assertNotIn ( deployment_tasks [ 0 ] [ 'id' ] , tasks_ids )