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