#NEWLINE# def load_fake_deployment_tasks( apply_to_db = True , commit = True ) : #NEWLINE# #INDENT# 'Load fake deployment tasks\n\n    :param apply_to_db: if True applying to all releases in db\n    :param commit: boolean\n    ' #NEWLINE# fxtr_path = os . path . join ( get_base_fixtures_path ( ) , 'deployment_tasks.yaml' ) #NEWLINE# with open ( fxtr_path ) as f : #NEWLINE# #INDENT# deployment_tasks = yaml . load ( f ) #NEWLINE# #UNINDENT# if apply_to_db : #NEWLINE# #INDENT# for rel in db ( ) . query ( models . Release ) . all ( ) : #NEWLINE# #INDENT# objects . DeploymentGraph . create_for_model ( { #NEWLINE# #INDENT# 'tasks' : deployment_tasks , #NEWLINE# #UNINDENT# } , apply_to_db ) #NEWLINE# #UNINDENT# if commit : #NEWLINE# #INDENT# db ( ) . commit ( ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return deployment_tasks