#NEWLINE# @ mock . patch . object ( console_utils , '_stop_console' , autospec = True ) #NEWLINE# def test_stop_shellinabox_console_fail_nopid( self , mock_stop ) : #NEWLINE# #INDENT# mock_stop . side_effect = iter ( [ exception . NoConsolePid ( '/tmp/blah' ) ] ) #NEWLINE# console_utils . stop_shellinabox_console ( self . info [ 'uuid' ] ) #NEWLINE# mock_stop . assert_called_once_with ( self . info [ 'uuid' ] )