class_docstr: Test class for the Terraform Cluster Generating
class_docstr_tok: ["Test","class","for","the","Terraform","Cluster","Generating"]
docstr: CLI - Terraform Generate CloudWatch Events, Invalid Pattern
docstr_tok: ["CLI","-","Terraform","Generate","CloudWatch","Events",",","Invalid","Pattern"]
code: def test_generate_cloudwatch_events_invalid_pattern(self, log_mock):
      """CLI - Terraform Generate CloudWatch Events, Invalid Pattern"""
      self.config["clusters"]["advanced"]["modules"][
          "cloudwatch_events"
      ]["event_pattern"] = {"invalid": ["aws.ec2"]}
  
      cloudwatch_events.generate_cloudwatch_events(
          "advanced", self.cluster_dict, self.config
      )
  
      assert_true(log_mock.called)
  
imports: from mock import ANY, Mock, patch
  from nose.tools import assert_equal, assert_dict_equal, assert_false, assert_raises, assert_true
  from streamalert.shared.exceptions import ConfigError
  from streamalert_cli.config import CLIConfig
  from streamalert_cli.terraform import common, cloudtrail, cloudwatch_destinations, cloudwatch_events, flow_logs, generate
label_desc: Use image node_id 16 for calling the TestTerraformGenerate obj's underlying member method code with example usage: obj.test_generate_cloudwatch_events_invalid_pattern(log_mock) without return types