#NEWLINE# def test_create_instance_with_device_name_empty( self ) : #NEWLINE# #INDENT# self . bdm [ 0 ] [ 'device_name' ] = '' #NEWLINE# params = { #NEWLINE# #INDENT# 'block_device_mapping' : self . bdm , #NEWLINE# #UNINDENT# } #NEWLINE# old_create = compute_api . API . create #NEWLINE# def create( * args , **kwargs ) : #NEWLINE# #INDENT# self . assertEqual ( kwargs [ 'block_device_mapping' ] , self . bdm ) #NEWLINE# return old_create ( * args , ** kwargs ) #NEWLINE# #UNINDENT# self . stubs . Set ( compute_api . API , 'create' , create ) #NEWLINE# self . assertRaises ( self . validation_error , self . _test_create , self )