#NEWLINE# def test_prediction_report( self ) : #NEWLINE# #INDENT# def _mock_get_label_probabilities( d ) : #NEWLINE# #INDENT# self . assertEquals ( d , ( - 1 ) ) #NEWLINE# return [ 0.5 , 0.3 , 0.2 ] #NEWLINE# #UNINDENT# def _mock_get_label_id( unused_label ) : #NEWLINE# #INDENT# return 0 #NEWLINE# #UNINDENT# def _mock_get_label_name( unused_label ) : #NEWLINE# #INDENT# return 'fake_label' #NEWLINE# #UNINDENT# self . string_classifier . _prediction_threshold = 0 #NEWLINE# self . string_classifier . _get_label_probabilities = _mock_get_label_probabilities #NEWLINE# self . string_classifier . _get_label_id = _mock_get_label_id #NEWLINE# prediction_report = self . string_classifier . _get_prediction_report_for_doc ( ( - 1 ) ) #NEWLINE# self . assertEquals ( prediction_report [ 'prediction_label_id' ] , 1 )