#NEWLINE# def test_instance_groups_from_json_file( self ) : #NEWLINE# #INDENT# data_path = os . path . join ( os . path . dirname ( __file__ ) , 'input_instance_groups.json' ) #NEWLINE# cmd = ( 'emr create-cluster --use-default-roles --ami-version 3.0.4  --instance-groups file://' + data_path ) #NEWLINE# result = copy . deepcopy ( DEFAULT_RESULT ) #NEWLINE# result [ 'Instances' ] [ 'InstanceGroups' ] = [ { #NEWLINE# #INDENT# 'InstanceRole' : 'MASTER' , #NEWLINE# 'InstanceCount' : 1 , #NEWLINE# 'Name' : 'Master Instance Group' , #NEWLINE# 'Market' : 'ON_DEMAND' , #NEWLINE# 'InstanceType' : 'm1.large' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'InstanceRole' : 'CORE' , #NEWLINE# 'InstanceCount' : 2 , #NEWLINE# 'Name' : 'Core Instance Group' , #NEWLINE# 'Market' : 'ON_DEMAND' , #NEWLINE# 'InstanceType' : 'm1.xlarge' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'InstanceRole' : 'TASK' , #NEWLINE# 'InstanceCount' : 3 , #NEWLINE# 'Name' : 'Task Instance Group' , #NEWLINE# 'Market' : 'SPOT' , #NEWLINE# 'BidPrice' : '3.45' , #NEWLINE# 'InstanceType' : 'm1.xlarge' , #NEWLINE# #UNINDENT# } ] #NEWLINE# self . assert_params_for_cmd ( result , result )