class_docstr: TestRunner to handle running various tests
docstr: Helper to get rule test files
  
  Args:
      directory (str): Path to directory containing test files
  
  Yields:
      str: Path to test event file
docstr_tok: ["Helper","to","get","rule","test","files","Args",":","directory","(","str",")",":","Path","to","directory","containing","test","files","Yields",":","str",":","Path","to","test","event","file"]
code: def _get_test_files(directory):
      """Helper to get rule test files
  
      Args:
          directory (str): Path to directory containing test files
  
      Yields:
          str: Path to test event file
      """
      for root, _, test_event_files in os.walk(directory):
          # Simple filter to remove any non-json files first
          files = [
              file
              for file in sorted(test_event_files)
              if os.path.splitext(file)[1] == ".json"
          ]
          if not files:
              continue
  
          yield root, files
  
imports: import argparse
  import os
  import jmespath
  from mock import patch, MagicMock
  from streamalert.alert_processor import main
  from streamalert.alert_processor.helpers import compose_alert
  from streamalert.alert_processor.outputs.output_base import OutputDispatcher
  from streamalert.classifier import classifier
  from streamalert.rules_engine import rules_engine
  from streamalert.shared import rule
  from streamalert.shared.config import ConfigError
  from streamalert.shared.logger import get_logger
  from streamalert.shared.stats import RuleStatisticTracker
  from streamalert_cli.helpers import check_credentials
  from streamalert_cli.test.format import format_green, format_red, format_underline, format_yellow
  from streamalert_cli.test.mocks import LookupTableMocks, ThreatIntelMocks
  from streamalert_cli.test.event_file import TestEventFile
  from streamalert_cli.utils import CLICommand, DirectoryType, generate_subparser, UniqueSortedFileListAction, UniqueSortedListAction
label_desc: Use image node_id 13 for calling the TestRunner obj's underlying member method code with example usage: obj._get_test_files(directory) without return types