#NEWLINE# def doAzureDiskTest( self , storage_type , disk_type , machine_type , goal_media , goal_replication , goal_legacy_disk_type ) : #NEWLINE# #INDENT# with mock . patch ( ( azure_disk . __name__ + '.FLAGS' ) ) as disk_flags : #NEWLINE# #INDENT# disk_flags . azure_storage_type = machine_type #NEWLINE# disk_spec = disk . BaseDiskSpec ( _COMPONENT , disk_size = 2 , disk_type = disk_type ) #NEWLINE# vm_spec = virtual_machine . BaseVmSpec ( 'test_vm_spec.AZURE' , zone = 'East US 2' , machine_type = machine_type ) #NEWLINE# vm = azure_virtual_machine . DebianBasedAzureVirtualMachine ( vm_spec ) #NEWLINE# azure_disk . AzureDisk . Create = mock . Mock ( ) #NEWLINE# azure_disk . AzureDisk . Attach = mock . Mock ( ) #NEWLINE# vm . CreateScratchDisk ( disk_spec ) #NEWLINE# self . assertEqual ( vm . scratch_disks [ 0 ] . metadata , { #NEWLINE# #INDENT# disk . MEDIA : goal_media , #NEWLINE# disk . REPLICATION : goal_replication , #NEWLINE# disk . LEGACY_DISK_TYPE : goal_legacy_disk_type , #NEWLINE# #UNINDENT# } )