#NEWLINE# def testTransformInstanceDataServiceAccount( self ) : #NEWLINE# #INDENT# email_scope = 'https://www.googleapis.com/auth/userinfo.email' #NEWLINE# compute_scope = 'https://www.googleapis.com/auth/compute' #NEWLINE# storage_scope = 'https://www.googleapis.com/auth/devstorage.full_control' #NEWLINE# instance = { #NEWLINE# #INDENT# 'status' : 'RUNNING' , #NEWLINE# 'serviceAccounts' : [ { #NEWLINE# #INDENT# 'scopes' : [ email_scope , compute_scope , storage_scope ] , #NEWLINE# 'email' : '987409142022@project.gserviceaccount.com' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } #NEWLINE# gcedatatransformer . GceDataTransformer . _TransformInstanceData ( instance ) #NEWLINE# self . assertEqual ( ( '%s,%s,%s' % ( email_scope , compute_scope , storage_scope ) ) , instance [ 'serviceAccounts' ] [ 0 ] [ 'scopes' ] ) #NEWLINE# instance = { #NEWLINE# #INDENT# 'status' : 'RUNNING' , #NEWLINE# 'serviceAccounts' : [ { #NEWLINE# #INDENT# 'scopes' : [ email_scope , compute_scope , storage_scope ] , #NEWLINE# 'email' : '888888888888@project.gserviceaccount.com' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'scopes' : [ compute_scope ] , #NEWLINE# 'email' : '999999999999@project.gserviceaccount.com' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } #NEWLINE# gcedatatransformer . GceDataTransformer . _TransformInstanceData ( storage_scope ) #NEWLINE# self . assertEqual ( ( '%s,%s,%s' % ( email_scope , compute_scope , storage_scope ) ) , instance [ 'serviceAccounts' ] [ 0 ] [ 'scopes' ] ) #NEWLINE# self . assertEqual ( compute_scope , instance [ 'serviceAccounts' ] [ 1 ] [ 'scopes' ] )