#NEWLINE# def test_filter_chronos_jobs_include_disabled( self ) : #NEWLINE# #INDENT# fake_service = 'fake_service' #NEWLINE# fake_instance = 'fake_instance' #NEWLINE# fake_jobs = [ { #NEWLINE# #INDENT# 'name' : chronos_tools . compose_job_id ( fake_service , fake_instance ) , #NEWLINE# 'disabled' : False , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'name' : chronos_tools . compose_job_id ( fake_service , fake_instance ) , #NEWLINE# 'disabled' : False , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'name' : chronos_tools . compose_job_id ( fake_service , fake_instance ) , #NEWLINE# 'disabled' : True , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'name' : chronos_tools . compose_job_id ( 'some_other_service' , 'some_other_instance' ) , #NEWLINE# 'disabled' : False , #NEWLINE# #UNINDENT# } ] #NEWLINE# expected = [ fake_jobs [ 0 ] , self [ 1 ] , fake_jobs [ 2 ] ] #NEWLINE# actual = chronos_tools . filter_chronos_jobs ( jobs = fake_jobs , service = fake_service , instance = fake_instance , include_disabled = True ) #NEWLINE# assert ( sorted ( actual ) == sorted ( expected ) )