class_docstr: Class to test Athena CLI
class_docstr_tok: ["Class","to","test","Athena","CLI"]
docstr: CLI - Athena rebuild partitions helper
docstr_tok: ["CLI","-","Athena","rebuild","partitions","helper"]
code: def test_rebuild_partitions():
      """CLI - Athena rebuild partitions helper"""
  
      with patch("streamalert.shared.athena.boto3") as mock_athena:
          mock_show_partitions_result = [
              {"Data": [{"VarCharValue": "dt=2019-12-04-05"}]},
              {"Data": [{"VarCharValue": "dt=2019-12-03-22"}]},
              {"Data": [{"VarCharValue": "dt=2019-12-03-23"}]},
              {"Data": [{"VarCharValue": "dt=2019-12-03-20"}]},
              {"Data": [{"VarCharValue": "dt=2019-12-04-01"}]},
          ]
  
          mock_show_table_result = []
          mock_athena.client.side_effect = [
              MockAthenaClient(results=mock_show_partitions_result),
              MockAthenaClient(results=mock_show_table_result),
          ]
  
          config = MockCLIConfig(config=athena_cli_basic_config())
  
          table = "unit_my_test"
          bucket = "bucket"
          assert_true(handler.rebuild_partitions(table, bucket, config))
  
file_path: streamalert/tests/unit/streamalert_cli/athena/test_handler.py
imports: from mock import Mock, patch
  from nose.tools import assert_equal, assert_true
  from streamalert.shared.firehose import FirehoseClient
  from streamalert_cli.athena import handler
  from streamalert_cli.config import CLIConfig
  from tests.unit.helpers.aws_mocks import MockAthenaClient
  from tests.unit.helpers.config import athena_cli_basic_config, MockCLIConfig
label_desc: Use image node_id 3 for calling the TestAthenaCli obj's underlying member method code with example usage: obj.test_rebuild_partitions() without return types