def test_conn_missing_method(self): db.merge_conn( Connection( conn_id=ADX_TEST_CONN_ID, conn_type='azure_data_explorer', login='client_id', password='client secret', host='https://help.kusto.windows.net', extra=json.dumps({}), ) ) with pytest.raises(AirflowException) as ctx: AzureDataExplorerHook(azure_data_explorer_conn_id=ADX_TEST_CONN_ID) assert 'is missing: `extra__azure_data_explorer__auth_method`' in str(ctx.value)