"""Test sme_analytics_ingestion_flow_control handler.""" from unittest.mock import patch import index @patch('index.logger') @patch('config.secrets_manager_client') @patch('index.sfn') @patch('ddex_ingester_common.helpers.rds.mysql_connection') def test_handler( mock_mysql, mock_state_machine, mock_secrets_manager, mock_current_logger ): """Test the handler.""" mock_state_machine.get_full_execution_count_by_arn.return_value = 9 index.handler({}, None) assert mock_state_machine.get_full_execution_name_list_by_arn.called assert not mock_state_machine.start_execution_by_arn.called assert mock_state_machine.get_full_execution_name_list_by_arn.called