def test_conn_method_aad_device(self, mock_init): mock_init.return_value = None db.merge_conn( Connection( conn_id=ADX_TEST_CONN_ID, conn_type='azure_data_explorer', host='https://help.kusto.windows.net', extra=json.dumps({'extra__azure_data_explorer__auth_method': 'AAD_DEVICE'}), ) ) AzureDataExplorerHook(azure_data_explorer_conn_id=ADX_TEST_CONN_ID) assert mock_init.called_with( KustoConnectionStringBuilder.with_aad_device_authentication('https://help.kusto.windows.net') )