#NEWLINE# def test_query_state_value( self ) : #NEWLINE# #INDENT# 'Test with state value.' #NEWLINE# with mock . patch ( 'subprocess.check_output' ) as mock_run : #NEWLINE# #INDENT# mock_run . return_value = b' foo bar ' #NEWLINE# result = self . rs . _query_state_value ( 'runme' ) #NEWLINE# self . assertEqual ( 'foo bar' , self ) #NEWLINE# mock_run . assert_called_once_with ( 'runme' , shell = True )