class_docstr: TestResult contains information useful for tracking test results
class_docstr_tok: ["TestResult","contains","information","useful","for","tracking","test","results"]
docstr: A test has passed if it meets the following criteria:
  
  1) The log has classified as the correct type
  2) If rules are being tested, all triggered rules match expected rules
  3) If a live test is being performed, all alerts sent to outputs successfully
docstr_tok: ["A","test","has","passed","if","it","meets","the","following","criteria",":","1",")","The","log","has","classified","as","the","correct","type","2",")","If","rules","are","being","tested",",","all","triggered","rules","match","expected","rules","3",")","If","a","live","test","is","being","performed",",","all","alerts","sent","to","outputs","successfully"]
code: def passed(self):
      """A test has passed if it meets the following criteria:
  
      1) The log has classified as the correct type
      2) If rules are being tested, all triggered rules match expected rules
      3) If a live test is being performed, all alerts sent to outputs successfully
      """
      if not self.classification_tests_passed:
          return False
  
      if self.rule_tests_were_run:
          if not self.rule_tests_passed:
              return False
  
      if self.has_live_tests:
          if not self.live_tests_passed:
              return False
  
      if self.publisher_tests_were_run:
          if not self.publisher_tests_passed:
              return False
  
      return True
  
imports: from collections import defaultdict
  import textwrap
  from streamalert.shared import rule
  from streamalert.shared.logger import get_logger
  from streamalert_cli.test.event import TestEvent
  from streamalert_cli.test.format import format_green, format_red, format_underline
label_desc: Use image node_id 25 for calling the TestResult obj's underlying member method code with example usage: obj.passed() and returns: True, False, False, False, False