#NEWLINE# def test_skip_missing_no_ramdisk( self ) : #NEWLINE# #INDENT# client = mock . MagicMock ( ) #NEWLINE# client . images . find . side_effect = ( self . image ( 'aaa' ) , exceptions . NotFound ) #NEWLINE# expected = { #NEWLINE# #INDENT# 'kernel' : 'aaa' , #NEWLINE# 'ramdisk' : None , #NEWLINE# #UNINDENT# } #NEWLINE# ids = glance . create_or_find_kernel_and_ramdisk ( client , 'bm-kernel' , 'bm-ramdisk' , skip_missing = True ) #NEWLINE# self . assertEqual ( ids , expected )