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 Cross Account
docstr_tok: ["CLI","-","Terraform","Generate","CloudWatch","Events","Cross","Account"]
code: def test_generate_cloudwatch_events_cross_account(self):
      """CLI - Terraform Generate CloudWatch Events Cross Account"""
      self.config["clusters"]["advanced"]["modules"][
          "cloudwatch_events"
      ]["cross_account"] = {
          "accounts": {
              "123456789012": ["us-east-1"],
              "234567890123": ["us-east-1"],
          },
          "organizations": {"o-aabbccddee": ["us-west-1"]},
      }
      cloudwatch_events.generate_cloudwatch_events(
          "advanced", self.cluster_dict, self.config
      )
  
      expected = {
          "cloudwatch_events_advanced": {
              "source": "./modules/tf_cloudwatch_events",
              "prefix": "unit-test",
              "cluster": "advanced",
              "kinesis_arn": "${module.kinesis_advanced.arn}",
              "event_pattern": '{"account": ["12345678910"]}',
          },
          "cloudwatch_events_cross_account_advanced_us-east-1": {
              "source": "./modules/tf_cloudwatch_events/cross_account",
              "region": "us-east-1",
              "accounts": ["123456789012", "234567890123"],
              "organizations": [],
              "providers": {"aws": "aws.us-east-1"},
          },
          "cloudwatch_events_cross_account_advanced_us-west-1": {
              "source": "./modules/tf_cloudwatch_events/cross_account",
              "region": "us-west-1",
              "accounts": [],
              "organizations": ["o-aabbccddee"],
              "providers": {"aws": "aws.us-west-1"},
          },
      }
  
      assert_equal(expected, self.cluster_dict["module"])
  
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 18 for calling the TestTerraformGenerate obj's underlying member method code with example usage: obj.test_generate_cloudwatch_events_cross_account() without return types