def test_conn_method_aad_app(self, mock_init): mock_init.return_value = None db.merge_conn( Connection( conn_id=ADX_TEST_CONN_ID, conn_type='azure_data_explorer', login='app_id', password='app key', host='https://help.kusto.windows.net', extra=json.dumps( { 'extra__azure_data_explorer__tenant': 'tenant', 'extra__azure_data_explorer__auth_method': 'AAD_APP', } ), ) ) AzureDataExplorerHook(azure_data_explorer_conn_id=ADX_TEST_CONN_ID) assert mock_init.called_with( KustoConnectionStringBuilder.with_aad_application_key_authentication( 'https://help.kusto.windows.net', 'app_id', 'app key', 'tenant' ) )