#NEWLINE# @ run_only_if_subprocess_check_output_is_available #NEWLINE# @ patch ( 'subprocess.check_output' ) #NEWLINE# def test_ceph_command_fails( self , check_output ) : #NEWLINE# #INDENT# check_output . side_effect = subprocess . CalledProcessError ( 255 , [ '/usr/bin/ceph' ] , 'error!' ) #NEWLINE# actual = self . collector . _get_stats_from_socket ( 'a_socket_name' ) #NEWLINE# check_output . assert_called_with ( [ '/usr/bin/ceph' , '--admin-daemon' , 'a_socket_name' , 'perf' , 'dump' ] ) #NEWLINE# self . assertEqual ( actual , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } )