#NEWLINE# def test_process_separate_task_attributes_properly( self ) : #NEWLINE# #INDENT# task = { #NEWLINE# #INDENT# 'id' : 'test' , #NEWLINE# 'type' : 'puppet' , #NEWLINE# 'role' : '*' , #NEWLINE# #UNINDENT# } #NEWLINE# task_prossesor = mock . MagicMock ( ) #NEWLINE# serialized_task = { #NEWLINE# #INDENT# 'id' : 'test' , #NEWLINE# 'type' : 'puppet' , #NEWLINE# 'uids' : [ '1' ] , #NEWLINE# 'parameters' : { #NEWLINE# #INDENT# 'cwd' : '/' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'requires' : [ 'test2' ] , #NEWLINE# 'required_for' : 'test3' , #NEWLINE# 'cross_depends' : [ { #NEWLINE# #INDENT# 'role' : '*' , #NEWLINE# 'name' : 'test4' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# 'cross_depended_by' : [ { #NEWLINE# #INDENT# 'role' : '*' , #NEWLINE# 'name' : 'test5' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# 'requires_ex' : [ ( None , 'test6' ) ] , #NEWLINE# 'required_for_ex' : [ ( None , 'test7' ) ] , #NEWLINE# #UNINDENT# } #NEWLINE# task_prossesor . process_tasks . return_value = [ serialized_task . copy ( ) ] #NEWLINE# self . serializer . task_processor = task_prossesor #NEWLINE# self . serializer . process_task ( task_prossesor , task_based_deployment . NullResolver ( [ '1' ] ) ) #NEWLINE# del serialized_task [ 'uids' ] #NEWLINE# paramters = serialized_task . pop ( 'parameters' ) #NEWLINE# self . assertItemsEqual ( [ '1' ] , self . serializer . tasks_connections ) #NEWLINE# self . assertItemsEqual ( [ 'test' ] , self . serializer . tasks_connections [ '1' ] ) #NEWLINE# self . assertEqual ( serialized_task , self . serializer . tasks_connections [ '1' ] [ 'test' ] ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# 'id' : 'test' , #NEWLINE# 'type' : 'puppet' , #NEWLINE# 'parameters' : paramters , #NEWLINE# #UNINDENT# } , self . serializer . tasks_dictionary [ 'test' ] )